Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a718394284
commit
b3f5ed41ae
24 files changed
+56
-58
No files matched your search
@@ -35,7 +35,7 @@ const waited = computed(() => {
|
||||
const next = computed(() => collabStore.nextRequest)
|
||||
|
||||
/**
|
||||
* 「看他交过什么」:只看这个学生、这道题。开新标签 —— 跳走这一页协作就断了。
|
||||
* 「看学生交过什么」:只看这个学生、这道题。开新标签 —— 跳走这一页协作就断了。
|
||||
* exactUsername:整名匹配,不然学号相近的同学(ks24a1 / ks24a10…)会混进来
|
||||
*/
|
||||
function openHisSubmissions() {
|
||||
@@ -81,7 +81,7 @@ function finishAndNext() {
|
||||
</span>
|
||||
<span v-if="!peek && waited" class="note">举手 {{ waited }}</span>
|
||||
<span class="spacer" />
|
||||
<button type="button" class="ghost" @click="openHisSubmissions">看他交过什么</button>
|
||||
<button type="button" class="ghost" @click="openHisSubmissions">看学生交过什么</button>
|
||||
<!-- 显式的「结束」:求助记录一并清掉。跳走页面发的是 leave("left"),
|
||||
那边只是退回排队 —— 见 store 里 leave 的注释 -->
|
||||
<button type="button" :class="next ? 'ghost' : 'end'" @click="finish">
|
||||
|
||||
@@ -58,9 +58,9 @@ watch([peer, () => problem.value?._id], load, { immediate: true })
|
||||
<n-button size="small" :loading="loading" @click="load">刷新</n-button>
|
||||
</n-flex>
|
||||
|
||||
<n-text v-if="failed" type="error">读不出他的提交,点「刷新」再试</n-text>
|
||||
<n-text v-if="failed" type="error">读不出提交,点「刷新」再试</n-text>
|
||||
<SubmissionResult v-else-if="latest" :submission="latest" peer />
|
||||
<n-empty v-else-if="checked" class="empty" description="他还没交过这道题" />
|
||||
<n-empty v-else-if="checked" class="empty" description="还没交过这道题" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ watch(
|
||||
},
|
||||
)
|
||||
|
||||
// 协作中的老师看的是学生的提交(ProblemSubmission 里按学生用户名查),页签写「他的提交」
|
||||
// 协作中的老师看的是学生的提交(ProblemSubmission 里按学生用户名查),页签写「学生的提交」
|
||||
const teacherCollab = useTeacherCollab()
|
||||
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ function goAllSubmissions() {
|
||||
:aria-selected="lastOpened === key"
|
||||
@click="open = key"
|
||||
>
|
||||
{{ key === "submission" && teacherCollab ? "他的提交" : DRAWER_TITLE[key] }}
|
||||
{{ key === "submission" && teacherCollab ? "学生的提交" : DRAWER_TITLE[key] }}
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="drawer-close" aria-label="关闭" @click="open = null">
|
||||
|
||||
@@ -256,7 +256,7 @@ watch(query, () => {
|
||||
<n-empty
|
||||
v-if="listed && !submissions.length"
|
||||
class="empty"
|
||||
:description="peer ? '他还没有交过这道题' : '这道题你还没有交过'"
|
||||
:description="peer ? '还没有交过这道题' : '这道题你还没有交过'"
|
||||
/>
|
||||
|
||||
<!-- 设计稿「我的提交 / 统计 / 点评:抽屉盖住左栏」:一整块带框的列表,行间一条细线 -->
|
||||
|
||||
@@ -63,10 +63,10 @@ const hint = computed(() => {
|
||||
if (props.check.passed) return ""
|
||||
if (!kind.value) {
|
||||
const name = JUDGE_STATUS[props.check.result as keyof typeof JUDGE_STATUS]?.name ?? "出错了"
|
||||
return `${props.peer ? "他" : "你"}的程序在这个例子上就「${name}」了,先让它在例子上跑通。`
|
||||
return `${props.peer ? "学生" : "你"}的程序在这个例子上就「${name}」了,先让它在例子上跑通。`
|
||||
}
|
||||
const text = explainDiff(kind.value, props.check, props.code, props.language)
|
||||
return props.peer ? text.replace(/你/g, "他") : text
|
||||
return props.peer ? text.replace(/你/g, "学生") : text
|
||||
})
|
||||
const diffLine = computed(() =>
|
||||
firstDifferentLine(props.check.expected ?? "", props.check.output ?? ""),
|
||||
@@ -161,7 +161,7 @@ function lines(text: string) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="block">
|
||||
<div class="label">{{ peer ? "他" : "你" }}的输出</div>
|
||||
<div class="label">{{ peer ? "学生" : "你" }}的输出</div>
|
||||
<div v-if="check.output" class="text">
|
||||
<template v-for="(line, i) in lines(check.output)" :key="i">
|
||||
<div v-if="i === diffLine && diffParts?.output" class="line">
|
||||
|
||||
Reference in new issue
Block a user