feat(流程图): 没画对也分得出远近——五档说法、完成度条、比上次多对了几组;右栏的图放大
只说「还没画对」,学生改了几次还是这一句,看不出在往前走。等级照旧存 S/A/B/C, 标题换成话:画对了,画得很清楚 / 画对了 / 快画对了 / 对了一部分 / 还没画对; 下面一根完成度条,走对几组亮几段;第二次起没画对时说比上次多(少)对了几组 (详情接口带上同一道题上一次走对了几组)。提交列表右栏的图从 42% 加宽到 62%, 小图也放大填满图框(最多 1.5 倍)。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ba90fe893e
commit
9ae6287fb1
6 files changed
+154
-13
No files matched your search
@@ -30,6 +30,17 @@ export function caseReport(details: Record<string, unknown> | null | undefined)
|
||||
} satisfies FlowchartCaseReport
|
||||
}
|
||||
|
||||
/**
|
||||
* 标题那句话(设计稿 FlowNote*)。等级照旧存 S/A/B/C,学生看到的是话:全对时 S「画得很清楚」、
|
||||
* A「画对了」;没全对按走对几组分三档,C 里一组都没对和对了几组分开说 —— 一直是「还没画对」
|
||||
* 会让人泄气
|
||||
*/
|
||||
export function flowchartVerdict(report: FlowchartCaseReport, grade: string | null) {
|
||||
if (report.passed === report.total) return grade === "S" ? "画对了,画得很清楚" : "画对了"
|
||||
if (report.passed * 2 >= report.total) return "快画对了"
|
||||
return report.passed > 0 ? "对了一部分" : "还没画对"
|
||||
}
|
||||
|
||||
/** 「6 组走对 3 组」「6 组全部走对」 */
|
||||
export function caseHeadline(report: FlowchartCaseReport) {
|
||||
return report.passed === report.total
|
||||
|
||||
Reference in new issue
Block a user