Skip to content

Commit 297219e

Browse files
WangYuTenggclaude
andcommitted
fix(autograde): clearer message when no auto-gradable questions exist
For MCQ-only assignments canAutoGrade is false because gradableCount==0, but missingModelAnswers is also 0 — so the warning rendered as "0 question(s) missing model answers", which is wrong and confusing. Show "No auto-gradable questions" in that branch instead. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b4409ad commit 297219e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/client/features/staff-grading/AssignmentAutoGradingList.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,9 @@ export function AssignmentAutoGradingList({ courseId }: AssignmentAutoGradingLis
447447
<div className="inline-flex items-center gap-2">
448448
<ExclamationTriangleIcon className="h-5 w-5 text-yellow-500" />
449449
<span className="text-yellow-700 text-xs">
450-
{assignment.missingModelAnswers.length} question(s) missing model answers
450+
{assignment.missingModelAnswers.length > 0
451+
? `${assignment.missingModelAnswers.length} question(s) missing model answers`
452+
: 'No auto-gradable questions'}
451453
</span>
452454
</div>
453455
) : assignment.ungradedAnswers === 0 ? (

0 commit comments

Comments
 (0)