Ticket:
Here are the places where grades get updated:
PersistentCourseGrade.update_or_create CourseGradeFactory._update CourseGradeFactory().update 1. CourseGradeFactory().iter if force_update compute_grades_for_course (** TASK) * management command: compute_grades * compute_all_grades_for_course GRADING_POLICY_CHANGED (handle_grading_policy_changed) 2. SUBSECTION_SCORE_CHANGED (recalculate_course_grade_only) recalculate_subsection_grade_v3 (** TASK **) PROBLEM_WEIGHTED_SCORE_CHANGED (enqueue_subsection_update) SUBSECTION_OVERRIDE_CHANGED (enqueue_subsection_update) management command: recalculate_subsection_grades 3. recalculate_course_and_subsection_grades_for_user (** TASK **) ENROLLMENT_TRACK_UPDATED (recalculate_course_and_subsection_grades) COHORT_MEMBERSHIP_UPDATED (recalculate_course_and_subsection_grades) management command: recalculate_learner_grades GradesService.override_subsection_grade GradesService.undo_override_subsection_grade SUBSECTION_OVERRIDE_CHANGED (enqueue_subsection_update) |
self-paced
course grades being update if it sets a course_end_date
? GRADING_POLICY_COUNTDOWN_SECONDS
lock?from datetime import timedelta from django.utils import timezone def should_update_grades(course_key): some_waffle_switch = True // Some waffle switch which we can pull information from for active/inactive? course = CourseOverview.get_from_id(course_key) if some_waffle_switch and course.end: // Not sure if we are ok for self paced courses with ends dates to be the part of the change grade_update_offset = course.end + timedelta(30) // There should some good place to store `30`. A config model/settings/static variable? now = timezone.now() if now > offset: return False return True |