From e3c09a3bb3248f1bff11bce48ed14708d17c919f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Pav=C3=A3o?= Date: Thu, 4 Jul 2024 17:10:04 +0200 Subject: [PATCH 01/21] More general exception in views.py --- src/apps/pages/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/pages/views.py b/src/apps/pages/views.py index 30a0f21ed..1a46e34af 100644 --- a/src/apps/pages/views.py +++ b/src/apps/pages/views.py @@ -111,7 +111,7 @@ def format_file_size(self, file_size): """ try: n = float(file_size) - except ValueError: + except Exception as e: return "" units = ['KB', 'MB', 'GB'] From e1d8bc6faddaf89e98004c4bad2f0dc4d228fad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Pav=C3=A3o?= Date: Thu, 4 Jul 2024 17:14:59 +0200 Subject: [PATCH 02/21] Update views.py --- src/apps/pages/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/pages/views.py b/src/apps/pages/views.py index 1a46e34af..4afa0c11d 100644 --- a/src/apps/pages/views.py +++ b/src/apps/pages/views.py @@ -111,7 +111,7 @@ def format_file_size(self, file_size): """ try: n = float(file_size) - except Exception as e: + except Exception: return "" units = ['KB', 'MB', 'GB'] From 545d5cab07132ee0abdd7f84b65868628d083910 Mon Sep 17 00:00:00 2001 From: didayolo Date: Tue, 9 Jul 2024 15:43:33 +0200 Subject: [PATCH 03/21] Remove Dockerfile.celery --- Dockerfile.celery | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 Dockerfile.celery diff --git a/Dockerfile.celery b/Dockerfile.celery deleted file mode 100644 index f9fee6f41..000000000 --- a/Dockerfile.celery +++ /dev/null @@ -1,5 +0,0 @@ -FROM python:3.6 -ENV PYTHONUNBUFFERED 1 -ENV C_FORCE_ROOT True -ADD requirements.txt . -RUN pip install -r requirements.txt From 14c845e74d63eec8b7ae5135a4514e9049122844 Mon Sep 17 00:00:00 2001 From: Ihsan Ullah Date: Fri, 12 Jul 2024 13:17:05 +0500 Subject: [PATCH 04/21] show leaderboard and detailed result page to approved participants --- src/apps/api/views/submissions.py | 8 +++---- .../riot/competitions/detail/leaderboards.tag | 21 ++++++++++++++++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/apps/api/views/submissions.py b/src/apps/api/views/submissions.py index fccaeefd4..e52034493 100644 --- a/src/apps/api/views/submissions.py +++ b/src/apps/api/views/submissions.py @@ -325,14 +325,14 @@ def get_detail_result(self, request, pk): submission = Submission.objects.get(pk=pk) # Check if competition show visualization is true if submission.phase.competition.enable_detailed_results: - # get submission's competition participants - participants = submission.phase.competition.participants.all() - participant_usernames = [participant.user.username for participant in participants] + # get submission's competition approved participants + approved_participants = submission.phase.competition.participants.filter(status=CompetitionParticipant.APPROVED) + participant_usernames = [participant.user.username for participant in approved_participants] # check if in this competition # user is collaborator # or - # user is participant + # user is approved participant # or # user is creator # or diff --git a/src/static/riot/competitions/detail/leaderboards.tag b/src/static/riot/competitions/detail/leaderboards.tag index 95b4fc793..8573a9243 100644 --- a/src/static/riot/competitions/detail/leaderboards.tag +++ b/src/static/riot/competitions/detail/leaderboards.tag @@ -41,7 +41,24 @@ - + + + + + Your request to participate in this competition is waiting for an approval from the competition organizer. + + + + + + + + Your request to participate in this competition is denied. Please contact the competition organizer for more details. + + + + + No submissions have been added to this leaderboard yet! @@ -71,6 +88,7 @@ + + + \ No newline at end of file diff --git a/src/static/riot/management.tag b/src/static/riot/management.tag index 904093abf..7e0d3a549 100644 --- a/src/static/riot/management.tag +++ b/src/static/riot/management.tag @@ -4,6 +4,7 @@