Fatal issue restoring from 3.x to 4.1 with competencies

Fatal issue restoring from 3.x to 4.1 with competencies

Randy Thornton -
回帖数:0


I have reported an issue here in this tracker MDL-77779 in which any course from 3.x which has course competencies that have been assigned to activity modules will produce a fatal error when the course is restored to a 4.1 site. The error you will see starts as:

Warning: Undefined property: stdClass::$overridegrade in /path/to/moodle//backup/moodle2/restore_stepslib.php on line 3752
Debug info: overridegrade: Data submitted is invalid
Error code: invalidpersistenterror
This is caused, as explained in the tracker, by a new setting added to 4.1 to allow teachers to manually override a competency rating awarded by activity completion (which is a good thing!). The restore does not properly handle this difference. This happens when you have imported the competency set to Moodle 4.1.

This issue means it is currently means that it is not possible to sucessfully restore a course from Moodle 3.x to 4.1 with its competencies. You have to uncheck, and therefore lose, and course and actviity level competencies to get the content to restore by itself. Note this will not affect 3.x sites upgraded in situ to 4.1, since the upgrade adds the necessary settings. This happens when restoring a course from a 3.x site to 4.1.

In the tracker I have also posted a code fix for this as well.


平均分:Useful (4)