-
Bug
-
Resolution: Fixed
-
Blocker
-
1.9.10
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
-
We have multiple client sites with automated backups that do not complete. Error messages point to the assignment module trying to require a file that doesn't exist.
PHP Warning: require_once(<moodle_root>/mod/assignment/type//assignment.class.php): failed to open stream: No such file or directory in <moodle_root>/mod/assignment/backuplib.php on line 79
PHP Fatal error: require_once(): Failed opening required '<moodle_root>/mod/assignment/type//assignment.class.php' (include_path='<moodle_root>/lib/pear:.:/usr/share/php:/usr/share/pear') in <moodle_root>/mod/assignment/backuplib.php on line 79
The middle of the require_once where it has a double slash should have been populated with the assignment type. It's not populated because the course_module record for the assignment has an instance of 0 so Moodle doesn't know what kind of assignment it is. The instance=0 records show up after a course is restored from backup, although not every restore has this issue and it is not limited to backups from different servers.
We created a patch that allows the assignment backup to skip assignments that have an instance of 0 and removes such records when restoring.
- has a non-specific relationship to
-
MDL-14326 Moodle does not delete empty course_modules after the restore
-
- Closed
-