diff --git a/bullet/bullet_admin/views/results.py b/bullet/bullet_admin/views/results.py index 25cf4b7d..23fc6e5c 100644 --- a/bullet/bullet_admin/views/results.py +++ b/bullet/bullet_admin/views/results.py @@ -30,6 +30,7 @@ def get_context_data(self, **kwargs): assert self.detection ctx = super().get_context_data(**kwargs) competition = get_active_competition(self.request) + ctx["competition"] = competition ctx["country"], ctx["language"] = self.detection ctx["venues"] = Venue.objects.for_competition(competition) ctx["my_venues"] = Venue.objects.for_request(self.request) diff --git a/bullet/problems/logic/results.py b/bullet/problems/logic/results.py index b9bdabae..4b7df18c 100644 --- a/bullet/problems/logic/results.py +++ b/bullet/problems/logic/results.py @@ -27,7 +27,12 @@ def get_results( return ( ResultRow.objects.filter(id__in=rows) - .order_by("-solved_count", "-solved_problems", "competition_time") + .order_by( + "-solved_count", + "-solved_problems", + "competition_time", + "team__rank_international", + ) .select_related("team", "team__school", "team__venue", "team__venue__category") .prefetch_related("team__contestants", "team__contestants__grade") ) diff --git a/bullet/problems/templates/problems/results.html b/bullet/problems/templates/problems/results.html index 6ad56366..80b28350 100644 --- a/bullet/problems/templates/problems/results.html +++ b/bullet/problems/templates/problems/results.html @@ -33,11 +33,18 @@