:py:mod:`oioioi.quizzes.controllers` ==================================== .. py:module:: oioioi.quizzes.controllers Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.quizzes.controllers.QuizContestControllerMixin oioioi.quizzes.controllers.QuizProblemController .. py:class:: QuizContestControllerMixin Bases: :py:obj:`object` ContestController mixin that sets up quiz config for the contest. .. py:method:: is_quiz_question_answer_case_ignored(question) Determines if checking a quiz questions' answer should be case insensitive. .. py:class:: QuizProblemController(problem) Bases: :py:obj:`oioioi.problems.controllers.ProblemController` Defines rules for quizzes. .. py:method:: adjust_problem() Called whan a (usually new) problem has just got the controller attached or after the problem has been modified. .. py:method:: _form_field_id_for_question(problem_instance, question) .. py:method:: validate_submission_form(request, problem_instance, form, cleaned_data) .. py:method:: render_pictures(pictures) .. py:method:: render_question(request, question) .. py:method:: render_answer(request, answer) .. py:method:: add_question_to_form(request, form, problem_instance, question) .. py:method:: select_questions(user, problem_instance, submission) .. py:method:: adjust_submission_form(request, form, problem_instance) .. py:method:: create_submission(request, problem_instance, form_data, **kwargs) .. py:method:: _submit_answers(selected_answers, question, submission) .. py:method:: _get_selected_answers(form_data, field_id, question) .. py:method:: is_quiz_question_answer_case_ignored(question) .. py:method:: mixins_for_admin() Returns an iterable of mixins to add to the default :class:`oioioi.problems.admin.ProblemAdmin` for this particular problem. The default implementation returns an empty tuple. .. py:method:: get_extra_problem_site_actions(problem) Returns a list of tuples (url, name) that will be displayed under actions in ProblemSite. .. py:method:: render_report_failure(request, report) .. py:method:: render_report(request, report) Renders the given report to HTML. Default implementation supports only rendering reports of kind ``FAILURE`` and raises :py:exc:`NotImplementedError` otherwise. .. py:method:: render_submission(request, submission) .. py:method:: render_submission_footer(request, submission) Renders the given submission footer to HTML. Footer is shown under the submission reports. The default implementation returns an empty string. .. py:method:: update_submission_score(submission) .. py:method:: fill_evaluation_environ(environ, submission, **kwargs) Fills a minimal environment with evaluation receipt and other values required by the evaluation machinery. Passed ``environ`` should 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, ``environ`` will be filled at least with a suitable evaluation ``recipe``. .. py:method:: generate_base_environ(environ, submission, **kwargs) .. py:method:: generate_initial_evaluation_environ(environ, submission, **kwargs) .. py:method:: supports_problem_statement() 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.