fix(题目): 修掉代码审查查出的几处问题——流程图拿到的徽章不弹、点评弹窗读失败时关不掉等
- 流程图画到 A / S 拿到的题单徽章、成就原来不弹:流程图那条 WebSocket 只认评分完成 / 失败, 成就消息被丢掉了,要等下次换路由拉 pending 才出来 - 强制点评弹窗读不出点评、或者一直交不上时,「下一题 / 继续」按钮也给出来:原来弹窗关不掉, 只能按浏览器后退;拦下换题时就记上「继续」,按钮文字不会写错 - 「放回编辑器」走正常的换语言路子(画流程图时切回代码编辑器、读那门语言的草稿); 这道题已经不收的语言(0020 摘掉的 Java / JS / Go)置灰,只能复制 - 举着手时刚交对、1.5 秒内点下一题:原来「确定要换题吗」要问两遍(点评完再问一次), 现在同意过的那个地址不再问 - 课堂看板上评分中、评失败的流程图不再算「尝试过」,和学生的课堂条一个口径; 新加的流程图查询和其他查询并行,不再多等一轮数据库 - 课堂条的数据只认最后发出的那次请求:进页面那次后到的话会把刚做完的那道盖回「没做」 - 「A / S 算做完」收进契约,前后端只留一份;协作中老师的判断统一用 useTeacherCollab; 几处放错位置、说法过时的注释 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
10169f5792
commit
83b6b7a81a
16 files changed
+162
-99
No files matched your search
@@ -9,13 +9,3 @@ export function gradeForScore(score: number) {
|
||||
if (score >= 70) return "B"
|
||||
return "C"
|
||||
}
|
||||
|
||||
/**
|
||||
* 画到这两档算这道题做完:题单进度、课堂条、「你画的流程图」都按它
|
||||
* (设计文档 2026-09-28-problem-page-redesign 第 3 节决定 4、6)
|
||||
*/
|
||||
export const FLOWCHART_PASS_GRADES = ["S", "A"]
|
||||
|
||||
export function isFlowchartPass(grade: string | null | undefined) {
|
||||
return grade === "S" || grade === "A"
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { FlowchartUpdate } from "@oj2/contract"
|
||||
import { isFlowchartPass, type FlowchartUpdate } from "@oj2/contract"
|
||||
import { eq } from "drizzle-orm"
|
||||
|
||||
import { config } from "../config"
|
||||
@@ -6,7 +6,7 @@ import { db, schema } from "../db"
|
||||
import { publishFlowchartUpdate } from "../events"
|
||||
import { completeChat } from "../services/ai"
|
||||
import { recordSolvedAndNotify } from "../services/problemset"
|
||||
import { gradeForScore, isFlowchartPass } from "./grade"
|
||||
import { gradeForScore } from "./grade"
|
||||
import type { FlowchartJobData } from "./job"
|
||||
|
||||
function evaluationPrompt(problem: typeof schema.problem.$inferSelect) {
|
||||
|
||||
Reference in new issue
Block a user