Exemplo n.º 1
0
    def submission_judged(self, submission, rejudged=False):
        super(ProblemExperienceMixinForContestController, self)\
                .submission_judged(submission, rejudged)

        try:
            report = SubmissionReport.objects.get(
                userresultforproblem__user=submission.user,
                userresultforproblem__problem_instance=
                    submission.problem_instance
            )

            PROBLEM_EXPERIENCE_SOURCE.handle_submission_report(report)

        except SubmissionReport.DoesNotExist:
            pass  # Possible in tests
Exemplo n.º 2
0
    def submission_judged(self, submission, rejudged=False):
        super(ProblemExperienceMixinForContestController, self)\
                .submission_judged(submission, rejudged)

        try:
            report = SubmissionReport.objects.get(
                userresultforproblem__user=submission.user,
                userresultforproblem__problem_instance=
                    submission.problem_instance
            )

            PROBLEM_EXPERIENCE_SOURCE.handle_submission_report(report)

        except SubmissionReport.DoesNotExist:
            pass  # Possible in tests
Exemplo n.º 3
0
def recalculate_on_difficulty_update(sender, instance, created, **kwargs):
    PROBLEM_EXPERIENCE_SOURCE.force_recalculate_problem(instance.problem)