mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
修改比赛排名的bug
This commit is contained in:
parent
152d949a14
commit
c163103542
@ -396,7 +396,7 @@ def _cmp(x, y):
|
||||
def contest_rank_page(request, contest_id):
|
||||
contest = Contest.objects.get(id=contest_id)
|
||||
contest_problems = ContestProblem.objects.filter(contest=contest).order_by("sort_index")
|
||||
result = ContestSubmission.objects.values("user_id").annotate(total_submit=Count("user_id"))
|
||||
result = ContestSubmission.objects.values("user_id").annotate(total_submit=Sum("total_submission_number"))
|
||||
for i in range(0, len(result)):
|
||||
# 这个人所有的提交
|
||||
submissions = ContestSubmission.objects.filter(user_id=result[i]["user_id"])
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
<tr>
|
||||
<th scope="row">{{ forloop.counter }}</th>
|
||||
<td>{{ item.user.username }}</td>
|
||||
<td>{{ item.total_ac }} / {{ item.total_submission_number }}</td>
|
||||
<td>{{ item.total_ac }} / {{ item.total_submit }}</td>
|
||||
<td>{% if item.total_time %}{{ item.total_time }} min{% else %}--{% endif %}</td>
|
||||
{% for problem in contest_problems %}
|
||||
<td class="{% submission_problem_result_class problem item.submissions %}">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user