feat(协作): 老师协作时右栏顶上一条协作条,结果页签先摆学生最近一次交的,抽屉变成「他的提交」
- 协作条:「正在帮 谁 · 语言 · 看他交过什么 ↗ · 结束协作」,从工具栏里挪出来,一眼看得出 编辑器里是学生的代码。「看他交过什么」带上学生用户名、开新标签(原来只带题号,还得再筛一遍) - 老师接单后「结果」页签原来是空的:现在摆学生在这道题上最近一次交的结果,可刷新; 不给 AI 提示(那是按登录的人自己的失败次数解锁的) - 抽屉「我的提交」在协作中变成「他的提交」,列的是学生的提交,只能复制、不能放回编辑器 (放回去会经协作通道直接盖掉学生正在写的代码),也不显示老师自己的排名 - 学生排队求助中、或者老师正在帮他时换题:先确认一句。换题会断开协作 / 撤掉举手, 原来一点「下一题」就把正在帮他的老师踢出去了 - 求助按钮文案:「举手求助」→「已举手 · 前面 2 人」→「某某 老师在帮你」 - 提交列表加 exactUsername=1:用户名精确匹配。原来只有「包含」,ks24a1 会把 ks24a10 的提交 也捞进来 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
11368813cc
commit
0c2ff68e9b
13 files changed
+287
-45
No files matched your search
@@ -3,6 +3,7 @@ import { storeToRefs } from "pinia"
|
||||
import { useProblemStore } from "oj/store/problem"
|
||||
import { useSubmissionStore } from "oj/store/submission"
|
||||
import { useCodeStore } from "oj/store/code"
|
||||
import { useTeacherCollab } from "../composables/teacherCollab"
|
||||
|
||||
/**
|
||||
* 左栏「结果」页签:三段 —— 提交结果 / 运行例子 / 自己输入。
|
||||
@@ -19,12 +20,16 @@ const PythonErrorExplain = defineAsyncComponent(() => import("./PythonErrorExpla
|
||||
const SampleRunResult = defineAsyncComponent(() => import("./SampleRunResult.vue"))
|
||||
const CustomRun = defineAsyncComponent(() => import("./CustomRun.vue"))
|
||||
const FlowchartResult = defineAsyncComponent(() => import("./FlowchartResult.vue"))
|
||||
const PeerLatest = defineAsyncComponent(() => import("./PeerLatest.vue"))
|
||||
|
||||
const submissionStore = useSubmissionStore()
|
||||
const { submission, syntaxErrorInfo, resultSegment } = storeToRefs(submissionStore)
|
||||
const { problem } = storeToRefs(useProblemStore())
|
||||
const codeStore = useCodeStore()
|
||||
|
||||
/** 协作中的老师自己还没交过:先摆学生最近一次交的 */
|
||||
const teacherCollab = useTeacherCollab()
|
||||
|
||||
/** 正在画流程图:结果就是 AI 的点评,没有例子可跑 */
|
||||
const drawing = computed(() => codeStore.code.language === "Flowchart")
|
||||
|
||||
@@ -51,6 +56,7 @@ const canTrial = computed(() => {
|
||||
<PythonErrorExplain :err-info="syntaxErrorInfo" />
|
||||
</n-flex>
|
||||
<SubmissionResult v-else-if="submission" :submission="submission" />
|
||||
<PeerLatest v-else-if="teacherCollab" />
|
||||
<n-empty
|
||||
v-else
|
||||
class="empty"
|
||||
|
||||
Reference in new issue
Block a user