- oioioi.mp.controllers.CONTEST_RANKING_KEY = c¶
- class oioioi.mp.controllers.MPRegistrationController(contest)¶
A base class for classes which should have a list of subclasses available.
The list of subclasses is available in their
subclassesclass attributes. Classes which have explicitly set
abstractclass attribute to
Trueare not added to
If a class has
modules_with_subclassesattribute (list or string), then specified modules for all installed applications can be loaded by calling
- property form_class¶
- property participant_admin¶
- registration_template = mp/registration.html¶
- classmethod anonymous_can_enter_contest()¶
Determines if an anonymous user can enter the contest.
Allowed anonymous users will have limited functionality, but they can see the problems, review questions etc. Modules should give them as much functionality as reasonably possible.
- Return type
Determines if participants may choose to stay anonymous, i.e. use their logins as public names.
Determines if the current user is allowed to enter the contest, i.e. see any page related to the contest.
The default implementation uses
filter_visible_contests()with a single-element contest queryset.
- Return type
django.db.models.Qexpression which can be used on
oioioi.contests.models.Contestqueryset already limited to contests using this controller to filter for contests the user can enter.
It must not make use of attribute contest of the controller, as it is not guaranteed to be set. It is called with None contest in :function:`oioioi.contests.utils.visible_contests`.
Returns an iterable of mixins to add to the default
oioioi.contests.admin.ContestAdminfor the contest.
The default implementation returns an empty tuple.
Whether the given contest has custom registered
participants (like the ones in OI and PA). Then and only then we allow to change terms accepted phrase.
- class oioioi.mp.controllers.MPContestController(contest)¶
Contains the contest logic and rules.
This is the computerized implementation of the contest’s official rules.
- create_forum = False¶
- show_email_in_participants_data = True¶
Submissions sent during the round are scored as normal. Submissions sent while the round was over but SubmissionScoreMultiplier was active are scored with given multiplier.
- can_submit(request, problem_instance, check_round_times=True)¶
Contest admin can always submit. Participant can submit if: a. round is active OR b. SubmissionScoreMultiplier exists and it’s end_time is ahead
- class oioioi.mp.controllers.MPRankingController(contest)¶
Changes to Default Ranking: 1. Sum column is just after User column 2. Rounds with earlier start_date are more to the left
- _iter_rounds(can_see_all, timestamp, partial_key, request=None)¶
- _filter_pis_for_ranking(partial_key, queryset)¶
- _render_ranking_page(key, data, page)¶