feat(课堂看板): 「这节课的题」旁边多一个语言下拉,布置 C 的作业学生打开题目编辑器就是 C
Deploy / deploy (push) Canceled after 0s

默认是这个班上一次布置选的语言。学生那边首页、题号下拉、题目页课堂条都写上「C语言」;
打开这节课的题时编辑器自动切过去,每道题只切一次,学生自己再换就按他的。提交列表的
「这节课」连语言一起筛。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-09-30 09:54:21 +08:00
1 parent a18e129f4c
commit 773d15b033
7 files changed
+93 -14

No files matched your search

+7 -2
View File
@@ -41,6 +41,7 @@ import {
type FlowchartStatistics,
type SubmissionStatistics,
type SubmissionLessons,
type RunnableLanguage,
type SubmissionStatisticsGrid,
type TodaySubmissionStatistics,
} from "@oj2/contract"
@@ -242,8 +243,12 @@ export function getClassLesson(className?: string) {
}
/** 给这个班布置今天的题,空数组 = 清掉 */
export function setClassLesson(className: string, problemDisplayIds: string[]) {
return api.put<null>("classroom/lesson", { className, problemDisplayIds })
export function setClassLesson(
className: string,
problemDisplayIds: string[],
language: RunnableLanguage | null,
) {
return api.put<null>("classroom/lesson", { className, problemDisplayIds, language })
}
/** 我的知识点地图(只有自己的,不能查别人) */