feat(课堂): 布置这节课的题时可以选用什么语言做,学生用别的语言交对不算这份作业做完
class_lesson 加一列 language(0024,可空:以前布置的、按提交推断出来的课都不限语言)。 布置时有题不支持选的语言就整个拒掉并点名是哪几道;看板的格子、学生首页的做完状态、 提交列表「这节课」都只认这个语言的代码提交,流程图照旧算。看板多给 lastLanguage 当默认值。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e3be3cd62c
commit
a18e129f4c
6 files changed
+4218
-19
No files matched your search
@@ -0,0 +1 @@
|
||||
ALTER TABLE "class_lesson" ADD COLUMN "language" text;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -169,6 +169,13 @@
|
||||
"when": 1790519287984,
|
||||
"tag": "0023_add_class_lesson",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 24,
|
||||
"version": "7",
|
||||
"when": 1790732755406,
|
||||
"tag": "0024_add_class_lesson_language",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -50,6 +50,7 @@ import type {
|
||||
ProblemSetDifficulty,
|
||||
ProblemSetStatus,
|
||||
ReactionKey,
|
||||
RunnableLanguage,
|
||||
SqlConfig,
|
||||
SqlDisplay,
|
||||
TagCategory,
|
||||
@@ -1477,6 +1478,11 @@ export const classLesson = pgTable(
|
||||
className: text("class_name").notNull(),
|
||||
day: text().notNull(),
|
||||
problemIds: jsonb("problem_ids").notNull().$type<number[]>(),
|
||||
/**
|
||||
* 这份作业用什么语言做(Python / C / C++),老师布置时选。可空:加这一列之前布置的
|
||||
* 没有它。写入侧在 PUT /classroom/lesson 按 runnableLanguageSchema 校验过
|
||||
*/
|
||||
language: text().$type<RunnableLanguage>(),
|
||||
createdBy: integer("created_by").notNull(),
|
||||
updatedAt: timestamp("updated_at", {
|
||||
withTimezone: true,
|
||||
|
||||
Reference in new issue
Block a user