Răsfoiți Sursa

fix restore score fields for v3 analysis report

Keep max_score, score_obtained, and knowledge_points in reduced question_analysis payload so V3 score computation and module mapping remain correct after memory optimizations.

Made-with: Cursor
yemeishu 2 săptămâni în urmă
părinte
comite
e0a97aceea
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      app/Services/ExamPdfExportService.php

+ 5 - 0
app/Services/ExamPdfExportService.php

@@ -1830,6 +1830,11 @@ class ExamPdfExportService
                     'question_id' => $item['question_id'] ?? null,
                     'question_bank_id' => $item['question_bank_id'] ?? null,
                     'is_correct' => $item['is_correct'] ?? null,
+                    // V3 诊断得分计算依赖这两个字段,不能裁掉
+                    'max_score' => $item['max_score'] ?? null,
+                    'score_obtained' => $item['score_obtained'] ?? null,
+                    // V3 模块归属计算依赖知识点信息,不能裁掉
+                    'knowledge_points' => $item['knowledge_points'] ?? [],
                 ];
             }, $templateData['analysis_data']['question_analysis']);
         }