Module Contents



A base class for classes which should have a list of subclasses


Ranking system uses two types of keys: "partial key"s and "full key"s.


Contains the contest logic and rules.

class oioioi.teachers.controllers.TeacherRegistrationController(contest)[source]

Bases: oioioi.participants.controllers.ParticipantsController

A base class for classes which should have a list of subclasses available.

The list of subclasses is available in their subclasses class attributes. Classes which have explicitly set abstract class attribute to True are not added to subclasses.

If a class has modules_with_subclasses attribute (list or string), then specified modules for all installed applications can be loaded by calling load_subclasses().

property form_class[source]
property participant_admin[source]
can_edit_registration(request, participant)[source]

View rendered when a user would like to perform an action not allowed by this registration controller.

This may be a good place to put a redirection to a registration page etc.

The default implementation just raises PermissionDenied.

class oioioi.teachers.controllers.TeacherRankingController(contest)[source]

Bases: oioioi.rankings.controllers.DefaultRankingController

Ranking system uses two types of keys: “partial key”s and “full key”s. Please note that full keys are abbreviated in the code as “key”s.

A pair (request, partial_key) should allow to build a full key, while a partial_key can always be extracted from the full key. partial keys identify the rounds to display and are used everywhere outside controllers and rankingsd (e.g. in views and urls). However, the actual ranking contents can depend on many other factors, like user permissions. This was the reason for introduction of full keys, which are always sufficient to choose the right data for serialization and display.

filter_users_for_ranking(key, queryset)[source]
class oioioi.teachers.controllers.TeacherContestController(contest)[source]

Bases: oioioi.programs.controllers.ProgrammingContestController

Contains the contest logic and rules.

This is the computerized implementation of the contest’s official rules.

create_forum = True[source]
fill_evaluation_environ(environ, submission)[source]