Commit c22976f1 by 冷斌

试卷

parent d06edf78
......@@ -111,6 +111,7 @@ class IndexAction extends Action
if (is_admin($this->mid) || $is_buy == 3 || $is_buy == 4 || $is_buy == 6) {
$v['is_buy'] = 1;
}
$v['exams_user'] = 100;
}
unset($v);
//获取试题难度
......@@ -180,7 +181,7 @@ class IndexAction extends Action
$this->assign('jumpUrl', U('exams/Index/index'));
$this->error('该试卷不存在!');
}
if ($this->is_wap && strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger')) {
$this->assign('is_wx', true);
}
......@@ -280,13 +281,13 @@ class IndexAction extends Action
}
$temp_id = intval($_GET['temp']);
// 获取试卷试题等信息 -- 判断自动组卷(1)和手动组卷
// 获取试卷试题等信息 -- 判断自动组卷(1)和手动组卷
if($paper['assembly_type'] == 1){
// 是否继续作答
if(!$temp_id){
$paper_options = D("ExamsPaper", 'exams')->doAssembly($paper);
}else{
$paper_options = D('ExamsPaperOptions', 'exams')->where(['exams_users_id'=>$temp_id])->find();
$paper_options = D('ExamsPaperOptions', 'exams')->where(['exams_users_id'=>$temp_id])->find();
}
$paper_options = D('ExamsPaperOptions', 'exams')->getPaperOptionsData($paper_options);
}else{
......@@ -352,7 +353,7 @@ class IndexAction extends Action
$this->error('你已超过该考试允许参考的最大次数');
}
}
$temp_id = D("ExamsUser", 'exams')->doExamsPaper($_POST);
if ($temp_id) {
$url = U('exams/Index/examsresult', ['joinType' => $_POST['exams_mode'],'paper_id' => $_POST['paper_id'],'temp' => $temp_id]);
......@@ -415,7 +416,7 @@ class IndexAction extends Action
$mod->exams_users_id = $temp_id;
}
//如果是高频练习单独获取试题
$exams_mode = D('ExamsUser', 'exams')->where(['exams_users_id'=>$temp_id])->getField('exams_mode');
if($_GET['joinType'] == 4 && $exams_mode == 4){
......
......@@ -86,7 +86,6 @@ class ExamsPaperModel extends Model
$data[$key]['exams_count'] = intval($v['exams_count']);
$data[$key]['reply_time'] = intval($v['reply_time']);
$data[$key]['exams_limit'] = intval($v['exams_limit']);
$data[$key]['exams_user'] = 100;
if(IS_API && $is_need == 0){
unset($data[$key]['paper_options']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment