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