feat(SQL 题): 增删改题的期望结果标出执行后变了的格子,删掉的行写清是哪几行
学生原来只能拿两张表逐格对,看不出要改的是哪几行。现在改过的格子、新插的行标黄, 删掉的行在表下面写「删掉了 2 行(id 是 2、3)」。按第一列配对,对不上就不标。 数据表和期望结果抽成一个组件,后台出题页的预览也用它。 题型判断统一走契约的 isSqlProblem()。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e01dabc6da
commit
25d3296410
12 files changed
+247
-421
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
isSqlProblem,
|
||||
classComparisonRequestSchema,
|
||||
STUDENT_ROLES,
|
||||
classLessonRequestSchema,
|
||||
@@ -929,7 +930,7 @@ classroomRoutes.put("/classroom/lesson", requireTeacher, async (c) => {
|
||||
// SQL 题除外:它只收 SQL,C 的作业里夹一道也不会让人选错语言,计数那边也放行了 SQL
|
||||
if (language) {
|
||||
const unsupported = found
|
||||
.filter((row) => !row.languages.includes(language) && !row.languages.includes("SQL"))
|
||||
.filter((row) => !row.languages.includes(language) && !isSqlProblem(row))
|
||||
.map((row) => row.displayId)
|
||||
if (unsupported.length) {
|
||||
return failure(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
isSqlProblem,
|
||||
contestPasswordRequestSchema,
|
||||
STUDENT_ROLES,
|
||||
type Contest,
|
||||
@@ -244,7 +245,7 @@ contestRoutes.get(
|
||||
allowFlowchart: problem.allowFlowchart,
|
||||
showFlowchart: problem.showFlowchart,
|
||||
hasAstRules: problem.astRules !== null,
|
||||
isSql: problem.languages.includes("SQL"),
|
||||
isSql: isSqlProblem(problem),
|
||||
myStatus: myStatusOf(statuses, problem.id),
|
||||
// 按人数是公开题库列表的列;比赛题表看的是榜单,不下发
|
||||
solvedUsers: 0,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
isSqlProblem,
|
||||
normalizeLanguage,
|
||||
problemListSortSchema,
|
||||
problemTypeFilterSchema,
|
||||
@@ -121,7 +122,7 @@ function listItem(
|
||||
allowFlowchart: row.problem.allowFlowchart,
|
||||
showFlowchart: row.problem.showFlowchart,
|
||||
hasAstRules: row.problem.astRules !== null,
|
||||
isSql: row.problem.languages.includes("SQL"),
|
||||
isSql: isSqlProblem(row.problem),
|
||||
// 流程图评到 A / S 也打勾:problemStates 已经把它算进 solved
|
||||
myStatus: states?.solved.has(id)
|
||||
? JudgeStatus.ACCEPTED
|
||||
|
||||
Reference in new issue
Block a user