Browse Source

fix:补充组卷类型数据存储

yemeishu 3 tuần trước cách đây
mục cha
commit
fede0f84fc

+ 1 - 0
app/Http/Controllers/Api/IntelligentExamController.php

@@ -257,6 +257,7 @@ class IntelligentExamController extends Controller
                 'paper_name' => $paperName,
                 'student_id' => $data['student_id'],
                 'teacher_id' => $data['teacher_id'] ?? null,
+                'assembleType' => $assembleType,
                 'difficulty_category' => $difficultyCategory,
                 'total_score' => $data['total_score'] ?? 100.0, // 默认100分
                 'questions' => $questions,

+ 1 - 1
app/Services/QuestionBankService.php

@@ -553,7 +553,7 @@ class QuestionBankService
                     'student_id' => $examData['student_id'] ?? '',
                     'teacher_id' => $examData['teacher_id'] ?? '',
                     'paper_name' => $examData['paper_name'] ?? '未命名试卷',
-                    'paper_type' => 'auto_generated',
+                    'paper_type' => $examData['assembleType'] ?? 'auto_generated', // 组卷类型: 0 摸底; 1 智能组卷,2. 知识点组卷,3 教材组卷
                     'total_questions' => 0, // 临时设为0,处理完题目后再更新
                     'total_score' => $examData['total_score'] ?? 0,
                     'status' => 'draft',