-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.1.5
-
None
-
MOODLE_21_STABLE
Noticed whilst confirming the fix for MDL-31589:
As an administrator:
- Create a new graded item. I confirmed with both an Online Text assignment, and Lesson
As a student - Submit an attempt at said graded item such that a gradebook entry is now present in mdl_grade_grades
As administrator:
- Backup the course:
- Include User Data
- Do not include the 'General' section, but do include the section with the activity in question
- Restore the backup:
- Go through all steps, merging in to the existing course
What you see:
Bang from duplicate userid, itemid index on grade_grades
It looks like backup/moodle2/restore_stepslib.php restore_gradebook_structure_step::process_grade_grade always tries an insert, even though process_grade_item may update an existing record
Not sure whether we should update the existing grade_grade record or ignore the newest data?