示例#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
示例#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
示例#3
0
def recalculate_on_difficulty_update(sender, instance, created, **kwargs):
    PROBLEM_EXPERIENCE_SOURCE.force_recalculate_problem(instance.problem)