-
Bug
-
Resolution: Fixed
-
Major
-
2.6
-
MOODLE_26_STABLE
-
MOODLE_26_STABLE
-
I'm struggling to work out how to replicate this, but I do have a fix.
Basically, it seems that if the source course has a section with an image inline, then that image is sometimes included twice in the backup. As a result, it's inserted twice by restore_dbops.class.php and because of unique key constraints on the pathhash, an exception is thrown.
It's easy to fix (check for the file first) but I'm struggling to write test instructions because I can't reliably replicate the issue. It seems to occur on a course if you've added a file to a section, and then later modified it.