A course contains checklist activities. A student is unenrolled from the course. During the unenrollment, the deletion of grades triggers re-evaluation of the student's completion status on the checklist activities and results in new grade records being inserted back into the gradebook. Later the student is re-enrolled in the course and the "recover grades if possible" option is selected. The grade recovery process will not recover grades if the user already has current grades in the course. The grade records re-inserted during the user enrollment prevent the student's full grades from be restored upon re-enrollment.
STEPS TO REPLICATE
1. Create a new course course.
2. In the the first section create an assignment and define activity completion requirements include at least "Student must receive a grade to complete this activity".
3. In the same course section add a checklist activity. In the checklist settings set the following:
Show course modules in checklist = Current section
Check-off when modules complete = Yes, cannot override
Activity Completion = Show activity as complete when conditions are met:
Student must receive a grade to complete this activity
Percentage of items that should be checked-off: 100%
4. Enroll a student in the course.
5. Take the necessary actions for the student to achieve completion of the assignment.
6. Review the checklist to observe that the assignment is marked complete in the checklist.
7. Review the gradebook and observe the student has a grade for the assignment and the checklist.
8. Unenroll the student from the course.
9. Re-enroll the student in the course ensuring to select the "Recover grades if possible" option.
The student's previous grade on the assignment and checklist are not recovered.
The student's previous grades on the assignment and checklist are recovered.
ADDITIONAL INVESTIGATION NOTES
Replicated using the default site-level settings for the checklist module.
If you have backend access this query helps illustrate what is happening in the grade history.
#Retrieve grade history for specific user in a course
select IFNULL(gc2.fullname, gc.fullname) as category, IFNULL (gc2.id, gc.id) as categoryid,
gi.itemtype, IFNULL(gc.fullname,gi.itemname) as item_name, gi.itemmodule, ggh.action, ggh.source, ggh.loggeduser,
ggh.rawgrade, ggh.finalgrade, ggh.overridden, from_unixtime(ggh.timemodified) grade_modified from mdl_grade_grades_history ggh
inner join mdl_grade_items gi on gi.id = ggh.itemid
left join mdl_grade_categories gc on gc.id = gi.iteminstance AND gi.itemtype = 'category'
left join mdl_grade_categories gc2 on gc2.id = gi.categoryid
where ggh.userid = <enter userid>
and gi.courseid = <enter courseid>
order by ggh.id;