|
@@ -63,10 +63,10 @@ class AssembleExamTaskJob implements ShouldQueue
|
|
|
$explanationKpCodes = null;
|
|
$explanationKpCodes = null;
|
|
|
|
|
|
|
|
if ($assembleType === 15) {
|
|
if ($assembleType === 15) {
|
|
|
- // 错题本组卷:paper_ids 传题库题目 question_id(须在该学生错题本 mistake_records 中存在),与 assemble_type=5 按卷追练(真实试卷 paper_id)分离
|
|
|
|
|
|
|
+ // assemble_type=15(展示类型「错题追练」):paper_ids 为题库 question_id,须在该学生 mistake_records 中存在;与 assemble_type=5(卷 id 追练)分离
|
|
|
$questionIdList = $this->normalizeBankQuestionIdsList($paperIds);
|
|
$questionIdList = $this->normalizeBankQuestionIdsList($paperIds);
|
|
|
if ($questionIdList === []) {
|
|
if ($questionIdList === []) {
|
|
|
- $taskManager->markTaskFailed($this->taskId, '错题本组卷需提供 paper_ids(题库题目 id)');
|
|
|
|
|
|
|
+ $taskManager->markTaskFailed($this->taskId, '错题追练组卷需提供 paper_ids(题库题目 id)');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -89,7 +89,7 @@ class AssembleExamTaskJob implements ShouldQueue
|
|
|
|
|
|
|
|
$questions = $this->hydrateQuestions($bankQuestions, $data['kp_codes'] ?? []);
|
|
$questions = $this->hydrateQuestions($bankQuestions, $data['kp_codes'] ?? []);
|
|
|
$questions = $this->sortQuestionsByRequestedIds($questions, $questionIds);
|
|
$questions = $this->sortQuestionsByRequestedIds($questions, $questionIds);
|
|
|
- $paperName = $data['paper_name'] ?? ('错题本组卷_'.$data['student_id'].'_'.now()->format('Ymd_His'));
|
|
|
|
|
|
|
+ $paperName = $data['paper_name'] ?? ('错题追练_'.$data['student_id'].'_'.now()->format('Ymd_His'));
|
|
|
} elseif (! empty($mistakeIds) || ! empty($mistakeQuestionIds)) {
|
|
} elseif (! empty($mistakeIds) || ! empty($mistakeQuestionIds)) {
|
|
|
// assemble_type=5 时 mistake_ids / mistake_question_ids 须严格归属该学生;其它类型走宽松解析。
|
|
// assemble_type=5 时 mistake_ids / mistake_question_ids 须严格归属该学生;其它类型走宽松解析。
|
|
|
if ($assembleType === 5) {
|
|
if ($assembleType === 5) {
|
|
@@ -274,7 +274,7 @@ class AssembleExamTaskJob implements ShouldQueue
|
|
|
/**
|
|
/**
|
|
|
* 追练(assemble_type=5)+ 指定错题:mistake_ids 须逐条命中该学生的 mistake_records;
|
|
* 追练(assemble_type=5)+ 指定错题:mistake_ids 须逐条命中该学生的 mistake_records;
|
|
|
* mistake_question_ids 须在该学生错题本中至少有一条记录。顺序:先按 mistake_ids 请求顺序,再追加题号列表(去重)。
|
|
* mistake_question_ids 须在该学生错题本中至少有一条记录。顺序:先按 mistake_ids 请求顺序,再追加题号列表(去重)。
|
|
|
- * 错题本组卷(assemble_type=15)将 paper_ids 解析为题库题目 id 后,仅使用本方法的 mistake_question_ids 分支做校验。
|
|
|
|
|
|
|
+ * assemble_type=15(错题追练)将 paper_ids 解析为题库题目 id 后,仅使用本方法的 mistake_question_ids 分支做校验。
|
|
|
*
|
|
*
|
|
|
* @return array{ok: bool, message?: string, question_ids?: array<int, string>}
|
|
* @return array{ok: bool, message?: string, question_ids?: array<int, string>}
|
|
|
*/
|
|
*/
|