-
Sub-task
-
Resolution: Won't Fix
-
Minor
-
None
-
1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.7, 1.7.1, 1.7.2, 1.8
-
None
-
Moodle 1.6
-
MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE
I was playing with one old module (certificate) that works perfectly under Moodle 1.6. Then, I've tried to perform one backup from one course containing one certificate.
I was surprised when no certificate was available to restore. Looking at code it seems that the "individual selection of activities" developed for 1.6 supported to "fall back" to all activities if the module didn't implemented the xxx_backup_one_mod() function (these was discussed in order to allow 3rd part modules to continue working without problems).
After looking to code, I've found that, in backuplib.php in the backup_fetch_prefs_from_request() function, the line 1987 (16_STABLE):
if (!count_records('course_modules','course',$course->id,'module',$mod->id) || !function_exists($modbackupone))
prevents activities without the "one" function to be registered for backup.
The question is what to do:
1) Try to fix that, in order to allow old modules not implementing the "one" function to work (from 1.6 to 1.8). I imagine this will affect backup in other steps and perhaps restore too.
2) Ignore it, assuming that only modules implementing the "one" function will work (current approach). This will allow us to delete a bunch of code that is currently in backuplib and modules in order to support "old" backup.
Just to think a bit about it... it's important but it seems that it hasn't caused too much problems in the past...