From fb892e6ab6a570c24802a7c91a1d299ae01c9dde Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Sat, 24 Oct 2015 17:00:37 +0800 Subject: [PATCH] =?UTF-8?q?0=20ac=20=E7=9A=84=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=8E=92=E5=90=8D=EF=BC=9B=E5=A2=9E=E5=8A=A0=E6=9F=90=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E6=9F=90=E4=B8=AA=E9=A2=98=E7=9A=84=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contest/views.py | 4 ++++ template/src/oj/contest/contest_rank.html | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/contest/views.py b/contest/views.py index fe893e63..ae6f9348 100644 --- a/contest/views.py +++ b/contest/views.py @@ -484,6 +484,10 @@ def contest_problem_submissions_list_page(request, contest_id, page=1): if user_id: submissions = submissions.filter(user_id=request.GET.get("user_id")) + problem_id = request.GET.get("problem_id", None) + if problem_id: + submissions = submissions.filter(problem_id=problem_id) + # 封榜的时候只能看到自己的提交 if not contest.real_time_rank: if not (request.user.admin_type == SUPER_ADMIN or request.user == contest.created_by): diff --git a/template/src/oj/contest/contest_rank.html b/template/src/oj/contest/contest_rank.html index b14eb287..0236365e 100644 --- a/template/src/oj/contest/contest_rank.html +++ b/template/src/oj/contest/contest_rank.html @@ -40,7 +40,7 @@ 用时 + 罚时 {% for item in contest_problems %} - {{ item.sort_index }} + {{ item.sort_index }} {% endfor %} @@ -48,7 +48,7 @@ {% for item in rank %} - {{ forloop.counter|add:paging_info.offset}} + {% if item.total_ac_number %}{{ forloop.counter|add:paging_info.offset}}{% else %}-{% endif %} {{ item.user__username }}