diff --git a/oioioi/mp/controllers.py b/oioioi/mp/controllers.py index 97c26c76d..b36493291 100644 --- a/oioioi/mp/controllers.py +++ b/oioioi/mp/controllers.py @@ -193,8 +193,8 @@ def can_submit(self, request, problem_instance, check_round_times=True): class MPRankingController(DefaultRankingController): """Changes to Default Ranking: - 1. Sum column is just after User column - 2. Rounds with earlier start_date are more to the left + 1. Rounds with earlier start_date are more to the left. + 2. Users with 0 points aren't listed. """ description = _("MP style ranking") @@ -212,10 +212,5 @@ def _iter_rounds(self, can_see_all, timestamp, partial_key, request=None): def _filter_pis_for_ranking(self, partial_key, queryset): return queryset.order_by("-round__start_date") - def _render_ranking_page(self, key, data, page): - request = self._fake_request(page) - data['is_admin'] = self.is_admin_key(key) - return render_to_string('mp/ranking.html', context=data, request=request) - def _allow_zero_score(self): return False diff --git a/oioioi/mp/templates/mp/ranking.html b/oioioi/mp/templates/mp/ranking.html deleted file mode 100644 index 26062ca26..000000000 --- a/oioioi/mp/templates/mp/ranking.html +++ /dev/null @@ -1,53 +0,0 @@ -{% load i18n pagination_tags get_user_name static simple_filters %} - -{% if rows %} - -{% else %} -
- {% blocktrans %}Strange, there is no one in this ranking...{% endblocktrans %} -
-{% endif %} - - - diff --git a/oioioi/rankings/static/common/rankings.scss b/oioioi/rankings/static/common/rankings.scss index 5e66d1475..d16b7af00 100644 --- a/oioioi/rankings/static/common/rankings.scss +++ b/oioioi/rankings/static/common/rankings.scss @@ -23,6 +23,9 @@ $ranking-cell-width: 100px !default; @include text-overflow(); max-width: $table-ranking-max-username-width; } + .sum-cell { + background-color: #e9e9e9; + } } .outdated-ranking-msg-float { diff --git a/oioioi/rankings/templates/rankings/default_ranking.html b/oioioi/rankings/templates/rankings/default_ranking.html index 924b62d84..478aaad6a 100644 --- a/oioioi/rankings/templates/rankings/default_ranking.html +++ b/oioioi/rankings/templates/rankings/default_ranking.html @@ -9,6 +9,7 @@ # {% trans "User" %} + {% trans "Sum" %} {% for pi, statement_visible in problem_instances %} {% if statement_visible %} {% url 'problem_statement' contest_id=contest.id problem_instance=pi.short_name as link %} @@ -19,7 +20,6 @@ {% if statement_visible %}{% endif %} {% endfor %} - {% trans "Sum" %} @@ -27,6 +27,7 @@ {{ row.place }} {% public_name row.user %} + {{ row.sum }} {% for result in row.results %} @@ -36,7 +37,6 @@ {% endfor %} - {{ row.sum }} {% endfor %}