Grades Resources

User Documentation

Code

Diagrams

Class, Component, and Physical Diagrams

https://drive.google.com/drive/folders/0B_nNCFTzAWvtbTFMVjF0ZklJcVU?usp=sharing

Web Sequence Diagrams

Grade Reads
participant UserAction
participant CourseGradeFactory
participant grades.models
participant CourseData

note over UserAction: View Progress Page or\nGenerate Grade Report
UserAction -> CourseGradeFactory: create
CourseGradeFactory -> grades.models: read
alt grades model exists
CourseGradeFactory -> CourseData: get grading policy
alt grading policy has NOT changed
CourseGradeFactory -> CourseGradeFactory: read
else grading policy has changed
CourseGradeFactory -> CourseGradeFactory: update
end
else grades model does NOT exist
CourseGradeFactory -> CourseGradeFactory: create_zero
end
CourseGradeFactory -> UserAction: CourseGrade

note over UserAction: View Course Dashboard
UserAction -> CourseGradeFactory: read
CourseGradeFactory -> grades.models: read
alt grades model exists
CourseGradeFactory -> CourseGradeFactory: read
CourseGradeFactory -> UserAction: CourseGrade
else grades model does NOT exist
CourseGradeFactory -> UserAction: None
end
Grade Writes
participant Problem
participant Submissions
participant module_render
participant grades.signals
participant grades.tasks
participant grades
participant grades.models
participant CSM
participant tracker
participant listeners

alt For problems that use CoursewareStudentModule
note over Submissions: Problem (using CSM) Submitted or Rescored
Problem -> module_render: self.runtime.publish\n('grade', only_if_higher)
module_render -> grades.signals: SCORE_PUBLISHED
note over grades.signals, grades.tasks, grades: if only_if_higher, get_score to compare scores
grades.signals -> CSM: get_score
note over grades.signals, grades.tasks, grades: set_score in both CSM and on the block 
grades.signals -> CSM: set_score
grades.signals -> Problem: set_score
grades.signals -> grades.signals: PROBLEM_RAW\n_SCORE_CHANGED
else For problems that use Submissions API
note over Submissions: Problem (using Submissions API) Submitted
Problem -> Submissions: set_score
Submissions -> grades.signals: score_set
end
grades.signals -> grades.signals: PROBLEM_WEIGHTED\n_SCORE_CHANGED
grades.signals -> tracker: edx.grades.problem.submitted
grades.signals -> grades.tasks: recalculate_\nsubsection_grade
grades.tasks -> grades.tasks: Retry on failure;\nEnqueue as FailedTask\n if retries exceeded.
note over grades.tasks: Verify database is updated\nwith score before proceeding
grades.tasks -> CSM: get_score
grades.tasks -> Submissions: get_score
grades.tasks -> grades: Subsection\nGradeFactory.\nupdate
activate grades
grades -> grades.models: Subsection\nGrade.\nupdate_or_create
grades.models -> tracker: edx.grades.\nsubsection.grade_calculated
grades -> grades.tasks: SubsectionGrade
grades.tasks -> grades.signals: SUBSECTION_\nSCORE_CHANGED
deactivate grades
grades.signals -> grades: CourseGradeFactory.\nupdate
activate grades
grades -> grades.models: Course\nGrade.\nupdate_or_create
grades.models -> tracker: edx.grades.\ncourse.grade_calculated
grades -> listeners: COURSE_GRADE_CHANGED
deactivate grades