Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
studyweb_Prototype
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yujiejie
studyweb_Prototype
Commits
94dfffef
提交
94dfffef
authored
8月 23, 2026
作者:
yujiejie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
821步骤十二完成
上级
943cd4a7
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
18 行增加
和
9 行删除
+18
-9
pages-mentor.js
pages-mentor.js
+18
-9
没有找到文件。
pages-mentor.js
浏览文件 @
94dfffef
...
...
@@ -2686,7 +2686,8 @@ function getMentorDeployMissingApiTests(sid) {
function
submitMentorDeployReview
()
{
var
sid
=
Number
(
mentorState
.
deployReviewStudentId
);
var
sub
=
getMentorDeploySubmission
(
sid
);
var
taskKey
=
getMentorDeployTaskKey
(
sid
);
var
sub
=
getMentorDeploySubmission
(
sid
,
taskKey
);
if
(
!
sub
)
{
showStudentFlowModal
(
'无法验收'
,
'该学生暂无提交内容。'
);
return
;
...
...
@@ -2731,21 +2732,28 @@ function submitMentorDeployReview() {
sub
.
review
.
round
=
(
parseInt
(
sub
.
review
.
round
,
10
)
||
0
)
+
1
;
sub
.
review
.
status
=
overallStatus
;
sub
.
review
.
comment
=
comment
;
sub
.
review
.
score
=
scores
;
if
(
conclusion
===
'通过'
)
sub
.
review
.
score
=
scores
;
sub
.
review
.
reviewedAt
=
reviewedAt
;
sub
.
review
.
notifiedAt
=
reviewedAt
;
sub
.
review
.
updatedAt
=
reviewedAt
;
// 同步到学生端
// 快照本轮 API 测试结果与验收参数,避免学生重提或导师重新测试影响历史验收记录
sub
.
review
.
tests
=
JSON
.
parse
(
JSON
.
stringify
(
getMentorDeployReviewNode
(
'tests'
,
sid
)[
sid
]
||
{}));
sub
.
review
.
params
=
JSON
.
parse
(
JSON
.
stringify
(
getMentorDeployReviewNode
(
'params'
,
sid
)[
sid
]
||
{}));
// 清空本轮
整体结论草稿,避免下次切换学生
时残留
sub
.
review
.
tests
=
JSON
.
parse
(
JSON
.
stringify
(
getMentorDeployReviewNode
(
'tests'
,
sid
,
taskKey
)[
sid
]
||
{}));
sub
.
review
.
params
=
JSON
.
parse
(
JSON
.
stringify
(
getMentorDeployReviewNode
(
'params'
,
sid
,
taskKey
)[
sid
]
||
{}));
// 清空本轮
结论 / 评分 / 评语草稿,避免下次切换学生或任务
时残留
if
(
mentorDeployReviewState
.
conclusion
)
delete
mentorDeployReviewState
.
conclusion
[
sid
];
if
(
mentorDeployReviewState
.
scores
&&
mentorDeployReviewState
.
scores
[
taskKey
]
&&
mentorDeployReviewState
.
scores
[
taskKey
][
sid
])
{
mentorDeployReviewState
.
scores
[
taskKey
][
sid
]
=
{};
}
if
(
mentorDeployReviewState
.
comments
&&
mentorDeployReviewState
.
comments
[
taskKey
]
&&
mentorDeployReviewState
.
comments
[
taskKey
][
sid
]
!==
undefined
)
{
delete
mentorDeployReviewState
.
comments
[
taskKey
][
sid
];
}
// 同步到 studentState(全局学生数据)
if
(
typeof
studentState
!==
'undefined'
)
{
studentState
.
deployReviewTaskKey
=
taskKey
;
studentState
.
deployReviewStatus
=
overallStatus
;
studentState
.
deployReviewComment
=
comment
;
studentState
.
deployReviewScore
=
scores
;
if
(
conclusion
===
'通过'
)
studentState
.
deployReviewScore
=
scores
;
studentState
.
deployReviewRound
=
sub
.
review
.
round
;
studentState
.
deployReviewUpdatedAt
=
reviewedAt
;
studentState
.
deployReviewNotifiedAt
=
reviewedAt
;
...
...
@@ -2763,12 +2771,13 @@ function submitMentorDeployReview() {
if
(
typeof
studentState
!==
'undefined'
)
{
if
(
!
studentState
.
notifications
)
studentState
.
notifications
=
[];
var
message
=
overallStatus
===
'已通过'
?
(
'你的部署验收已通过,本次评分 '
+
scores
.
total
+
'/100 分。'
)
:
(
'你的部署验收需要处理(结论:'
+
conclusion
+
')。'
+
(
comment
?
'评语:'
+
comment
:
''
));
?
(
'你的
「'
+
(
MENTOR_DEPLOY_TASKS
[
taskKey
]
?
MENTOR_DEPLOY_TASKS
[
taskKey
].
title
:
taskKey
)
+
'」
部署验收已通过,本次评分 '
+
scores
.
total
+
'/100 分。'
)
:
(
'你的
「'
+
(
MENTOR_DEPLOY_TASKS
[
taskKey
]
?
MENTOR_DEPLOY_TASKS
[
taskKey
].
title
:
taskKey
)
+
'」
部署验收需要处理(结论:'
+
conclusion
+
')。'
+
(
comment
?
'评语:'
+
comment
:
''
));
studentState
.
notifications
.
unshift
({
id
:
'deploy-'
+
sid
+
'-'
+
reviewedAt
.
replace
(
/
[^
0-9
]
/g
,
''
),
id
:
'deploy-'
+
sid
+
'-'
+
taskKey
+
'-'
+
reviewedAt
.
replace
(
/
[^
0-9
]
/g
,
''
),
type
:
'deploy-review'
,
studentId
:
sid
,
taskKey
:
taskKey
,
round
:
sub
.
review
.
round
,
status
:
overallStatus
,
title
:
title
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论