:py:mod:`oioioi.teachers.controllers` ===================================== .. py:module:: oioioi.teachers.controllers Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.teachers.controllers.TeacherRegistrationController oioioi.teachers.controllers.TeacherRankingController oioioi.teachers.controllers.TeacherContestController .. py:class:: TeacherRegistrationController(contest) Bases: :py:obj:`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 :attr:`subclasses` class attributes. Classes which have *explicitly* set :attr:`abstract` class attribute to ``True`` are not added to :attr:`subclasses`. If a class has ``modules_with_subclasses`` attribute (list or string), then specified modules for all installed applications can be loaded by calling :meth:`~RegisteredSubclassesBase.load_subclasses`. .. py:property:: form_class .. py:property:: participant_admin .. py:method:: can_register(request) .. py:method:: can_edit_registration(request, participant) .. py:method:: no_entry_view(request) 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``. .. py:class:: TeacherRankingController(contest) Bases: :py:obj:`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. .. py:method:: filter_users_for_ranking(key, queryset) .. py:class:: TeacherContestController(contest) Bases: :py:obj:`oioioi.programs.controllers.ProgrammingContestController` Contains the contest logic and rules. This is the computerized implementation of the contest's official rules. .. py:attribute:: description .. py:attribute:: create_forum :annotation: = True .. py:method:: fill_evaluation_environ(environ, submission) .. py:method:: registration_controller() .. py:method:: ranking_controller()