fix: share precise scoring failure labels across API chat and exports

This commit is contained in:
2026-10-18 12:16:04 +08:00
parent 000638718c
commit ba5a6952bb
3 changed files with 47 additions and 6 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ from sqlalchemy import select
from .actions import prepare, require_scope
from .evidence import CONTENT_ALLOWED, STRUCTURE_ALLOWED
from .exports import STATUS_LABELS, batch_projects, page_type_label, project_result
from .exports import batch_projects, page_type_label, project_result
from .knowledge_pages import page_links
from .models import (Conversation, Course, CourseVersion, IndexTask, KnowledgeChunk, KnowledgeDocument, KnowledgePage,
Project, RubricVersion, ScoringBatch, Student, SubmissionFile)
@@ -384,7 +384,7 @@ def scores(db, convo, args, _user):
"max_score": row["criterion"]["max_score"], "score_id": row["score_id"],
"model_score": row["model_score"], "teacher_score": row["teacher_score"],
"final_score": row["final_score"], "status": row["status"],
"status_label": STATUS_LABELS.get(row["status"], row["status"]),
"status_label": row["status_label"],
"error": str(row["error"] or "")[:300],
# Which body targets still lack evidence, so the answer can
# explain a review item instead of reporting a score.