![]() fixes CNVS-17901 The GradeSummaryAssignmentPresenter#grade_distribution would throw an error when it was triggered with a concluded student, because its call to GradeSummaryPresenter#assignment_stats returned an empty hash, instead of one which contains the assignment's id as a key. A NoMethodError was triggered off of a nil provided by the hash. To fix this, I wrapped the offending code in an if clause to guard against this case. Test Plan: 1. Create a published course that has a student and at least 1 graded assignment 2. Give the student a grade for the assignment 3. Conclude the student's enrollment on the course's user show page 4. Go to the course people page and select "View Prior Enrollments" 5. Select the grade under the Total column for the concluded student 6. Confirm that the page loads and displays a grade. Change-Id: I1bb6b4ba4b64ccdb976634fd68b916f1814b539d Reviewed-on: https://gerrit.instructure.com/48001 Tested-by: Jenkins Reviewed-by: Josh Simpson <jsimpson@instructure.com> QA-Review: Amber Taniuchi <amber@instructure.com> Product-Review: Strand McCutchen <smccutchen@instructure.com> |
||
---|---|---|
.. | ||
quizzes | ||
discussion_topic_presenter_spec.rb | ||
grade_summary_assignment_presenter_spec.rb | ||
grade_summary_presenter_spec.rb | ||
grades_presenter_spec.rb | ||
override_list_presenter_spec.rb | ||
override_tooltip_presenter_spec.rb |