oioioi.quizzes.controllers¶
Module Contents¶
Classes¶
ContestController mixin that sets up quiz config for the contest. |
|
Defines rules for quizzes. |
- class oioioi.quizzes.controllers.QuizContestControllerMixin[source]¶
Bases:
objectContestController mixin that sets up quiz config for the contest.
- class oioioi.quizzes.controllers.QuizProblemController(problem)[source]¶
Bases:
oioioi.problems.controllers.ProblemControllerDefines rules for quizzes.
- adjust_problem()[source]¶
Called whan a (usually new) problem has just got the controller attached or after the problem has been modified.
- mixins_for_admin()[source]¶
Returns an iterable of mixins to add to the default
oioioi.problems.admin.ProblemAdminfor this particular problem.The default implementation returns an empty tuple.
- get_extra_problem_site_actions(problem)[source]¶
Returns a list of tuples (url, name) that will be displayed under actions in ProblemSite.
- render_report(request, report)[source]¶
Renders the given report to HTML.
Default implementation supports only rendering reports of kind
FAILUREand raisesNotImplementedErrorotherwise.
Renders the given submission footer to HTML.
Footer is shown under the submission reports. The default implementation returns an empty string.
- fill_evaluation_environ(environ, submission, **kwargs)[source]¶
Fills a minimal environment with evaluation receipt and other values required by the evaluation machinery.
Passed
environshould already contain entries for the actiual data to be judged (for example the source file to evaluate).Details on which keys need to be present should be specified by particular subclasses.
As the result,
environwill be filled at least with a suitable evaluationrecipe.
- supports_problem_statement()[source]¶
If the ProblemController supports problem statement, opening the problem in a contest shows the associated problem statement or an information that it doesn’t have one. On the other hand, if it doesn’t support the problem statement, opening the problem redirects to submit solution page.