:py:mod:`oioioi.usercontests.controllers` ========================================= .. py:module:: oioioi.usercontests.controllers Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.usercontests.controllers.UserContestController .. py:class:: UserContestController(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:method:: registration_controller() .. py:method:: can_see_test(request, test) .. py:method:: can_see_checker_exe(request, checker) .. py:method:: can_submit(request, problem_instance, check_round_times=True) Determines if the current user is allowed to submit a solution for the given problem. The default implementation checks if the user is not anonymous, and if the round is active for the given user. Subclasses should also call this default implementation. .. py:method:: filter_visible_sources(request, queryset) Determines which sources the user could see. This usually involves cross-user privileges, like publicizing sources. Default implementations delegates to :meth:`~ContestController.filter_my_visible_submissions`, except for admins and observers, which get full access. Queryset's model should be oioioi.contest.Submission .. py:method:: can_see_source(request, submission) Check if submission's source should be visible. :type submission: oioioi.contest.Submission Consider using filter_visible_sources instead, especially for batch queries.