修复比赛所有题目列表页面上显示了隐藏问题的 bug
This commit is contained in:
@@ -291,7 +291,6 @@ class MakeContestProblemPublicAPIView(APIView):
|
|||||||
return success_response(u"创建成功")
|
return success_response(u"创建成功")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ContestPasswordVerifyAPIView(APIView):
|
class ContestPasswordVerifyAPIView(APIView):
|
||||||
@login_required
|
@login_required
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
@@ -374,7 +373,7 @@ def contest_problems_list_page(request, contest_id):
|
|||||||
比赛所有题目的列表页
|
比赛所有题目的列表页
|
||||||
"""
|
"""
|
||||||
contest = Contest.objects.get(id=contest_id)
|
contest = Contest.objects.get(id=contest_id)
|
||||||
contest_problems = ContestProblem.objects.filter(contest=contest).select_related("contest").order_by("sort_index")
|
contest_problems = ContestProblem.objects.filter(contest=contest, visible=True).select_related("contest").order_by("sort_index")
|
||||||
return render(request, "oj/contest/contest_problems_list.html", {"contest_problems": contest_problems,
|
return render(request, "oj/contest/contest_problems_list.html", {"contest_problems": contest_problems,
|
||||||
"contest": {"id": contest_id}})
|
"contest": {"id": contest_id}})
|
||||||
|
|
||||||
@@ -466,6 +465,7 @@ class ContestTimeAPIView(APIView):
|
|||||||
"""
|
"""
|
||||||
获取比赛开始或者结束的倒计时,返回毫秒数字
|
获取比赛开始或者结束的倒计时,返回毫秒数字
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
contest_id = request.GET.get("contest_id", -1)
|
contest_id = request.GET.get("contest_id", -1)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user