Skip to content

Commit

Permalink
修复
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartHypercube committed Sep 10, 2023
1 parent 2b64c07 commit 3402291
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions frontend/templates/admin_submission.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<a v-for="(name, group) in groups" href="#" :class="{selected: filters.group===group}" @click.prevent="change_filter({group: group})">{{ name }}</a>
</p>
<div class="results">
<table v-if="!filter.violations" id="result_list">
<table v-if="!filters.violations" id="result_list">
<thead>
<tr>
<th scope="col"><div class="text"><span>#</span></div><div class="clear"></div></th>
Expand Down Expand Up @@ -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}`;
}
},
},
Expand Down
2 changes: 1 addition & 1 deletion server/challenge/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3402291

Please sign in to comment.