|
@@ -114,8 +114,12 @@ class Practice extends Backend
|
|
|
//匹配的学员自动加入 mx_real_exam_fault 考试故障关联表
|
|
|
$fault_list = Fault::where(['sim_type' => $params['sim_type'], 'fault_state' => 0,'fault_type'=>3])->select();
|
|
|
if($params['question_setting_method']==1){ //系统随机
|
|
|
+ $fault_key1 = rand(0, 1);
|
|
|
+ $fault_key2 = rand(2, 3);
|
|
|
+ $fault_key3 = rand(4, 5);
|
|
|
+ $fault_key = [$fault_key1,$fault_key2,$fault_key3];
|
|
|
// $fault_key = array_rand($fault_list, 3);
|
|
|
- $fault_key = $this->rand_fault($fault_list);
|
|
|
+ // $fault_key = $this->rand_fault($fault_list);
|
|
|
}else if($params['question_setting_method']==2){//教师自选
|
|
|
$question_ids = $params['question_ids'];
|
|
|
}else if($params['question_setting_method']==3){ //任务自选
|
|
@@ -228,8 +232,12 @@ class Practice extends Backend
|
|
|
//匹配的学员自动加入 mx_real_exam_fault 考试故障关联表
|
|
|
$fault_list = Fault::where(['sim_type' => $params['sim_type'], 'fault_state' => 0,'fault_type'=>3])->select();
|
|
|
if($params['question_setting_method']==1){ //系统随机
|
|
|
+ $fault_key1 = rand(0, 1);
|
|
|
+ $fault_key2 = rand(2, 3);
|
|
|
+ $fault_key3 = rand(4, 5);
|
|
|
+ $fault_key = [$fault_key1,$fault_key2,$fault_key3];
|
|
|
// $fault_key = array_rand($fault_list, 3);
|
|
|
- $fault_key = $this->rand_fault($fault_list);
|
|
|
+ // $fault_key = $this->rand_fault($fault_list);
|
|
|
}else if($params['question_setting_method']==2){//教师自选
|
|
|
$question_ids = $params['question_ids'];
|
|
|
}else if($params['question_setting_method']==3){ //任务自选
|