diff --git a/frontend/templates/admin_submission.html b/frontend/templates/admin_submission.html index 10c80d6..7085948 100644 --- a/frontend/templates/admin_submission.html +++ b/frontend/templates/admin_submission.html @@ -22,7 +22,7 @@ {{ name }}
# |
@@ -169,10 +169,10 @@
this.refresh();
},
show_user(pk) {
- if (users[obj.user]) {
- return `${obj.user}.${users[obj.user]}`;
+ if (this.users[pk]) {
+ return `${pk}.${this.users[pk]}`;
} else {
- return `${obj.user}`;
+ return `${pk}`;
}
},
},
diff --git a/server/challenge/interface.py b/server/challenge/interface.py
index be5c896..1541f9f 100644
--- a/server/challenge/interface.py
+++ b/server/challenge/interface.py
@@ -121,7 +121,7 @@ def check_flag_with_violations(self, text):
if len(matches) == 1:
violations.append((self._context.user.pk, f"在题目 {flags[i]['name']} 中提交了 ID 为 {matches[0].user} 的选手的 flag"))
violations.append((matches[0].user, f"在题目 {flags[i]['name']} 中被 ID 为 {self._context.user.pk} 的选手提交了自己的 flag"))
- else:
+ elif len(matches) > 1:
violations.append((self._context.user.pk, f"在题目 {flags[i]['name']} 中提交了其他 {len(matches)} 名选手的 flag"))
return [], violations
---|