|
@@ -46,7 +46,7 @@ class Exercise extends Backend
|
|
|
|
|
|
public function index()
|
|
|
{
|
|
|
- $info = $this->exam_model->where(['user_id'=>$this->auth->id,'exam_status'=>4])->find();
|
|
|
+ $info = $this->exam_model->where(['user_id'=>$this->auth->id,'exam_status'=>4,'exam_collection_type'=>2])->find();
|
|
|
if(!empty($info)){
|
|
|
echo "<script>location.href='/admin/student/exercise/examing/ids/".$info['exam_id']."'</script>";
|
|
|
die();
|
|
@@ -61,12 +61,15 @@ class Exercise extends Backend
|
|
|
$count = 0;
|
|
|
Db::startTrans();
|
|
|
try {
|
|
|
- $exam_info = $this->exam_model->where(['user_id'=>$this->auth->id,'exam_status'=>1])->find();
|
|
|
+ $exam_info = $this->exam_model->where(['user_id'=>$this->auth->id,'exam_status'=>1,'exam_collection_type'=>2])->find();
|
|
|
//考试集合id $exam_id
|
|
|
//学员考试id $examid
|
|
|
if(!empty($exam_info)){
|
|
|
$exam_id = $exam_info['exam_collection_id'];
|
|
|
$examid = $exam_info['exam_id'];
|
|
|
+
|
|
|
+ //同步更新练习的模拟器类型
|
|
|
+ $this->exam_model->where(['exam_id'=>$exam_info['exam_id']])->update(['sim_type'=>$params['sim_type']]);
|
|
|
}else{
|
|
|
$params['exam_collection_type'] = 2;
|
|
|
$params['exam_collection_state'] = 2;
|