|
|
@@ -126,8 +126,11 @@ class IntelligentExamController extends Controller
|
|
|
|
|
|
$data = $validator->validated();
|
|
|
$assembleType = (int) ($data['assemble_type'] ?? 4);
|
|
|
- $defaultQuestions = in_array($assembleType, [1, 8]) ? 10 : 20;
|
|
|
- $data['total_questions'] = $data['total_questions'] ?? $defaultQuestions;
|
|
|
+ if (in_array($assembleType, [1, 8])) {
|
|
|
+ $data['total_questions'] = 10;
|
|
|
+ } else {
|
|
|
+ $data['total_questions'] = $data['total_questions'] ?? 20;
|
|
|
+ }
|
|
|
$this->ensureStudentTeacherRelation($data);
|
|
|
|
|
|
// 【修改】使用series_id、semester_code和grade获取textbook_id
|