Skip to content
Permalink
Browse files

Add instances to info/mods in scheduled backup so they can be granula…

…rly restore from
  • Loading branch information...
mjollnir_
mjollnir_ committed Jan 15, 2006
1 parent f90666a commit 9f23133b04ca9509e4e3c1dc174daf5454b4cf49
Showing with 14 additions and 0 deletions.
  1. +14 −0 backup/backup_scheduled.php
@@ -391,6 +391,20 @@ function schedule_backup_course_configure($course,$starttime = 0) {
}
}
}
// now set instances
if ($coursemods = get_course_mods($course->id)) {
foreach ($coursemods as $mod) {
if (array_key_exists($mod->modname,$preferences->mods)) { // we are to backup this module
if (empty($preferences->mods[$mod->modname]->instances)) {
$preferences->mods[$mod->modname]->instances = array(); // avoid warnings
}
$preferences->mods[$mod->modname]->instances[$mod->instance]->backup = $preferences->mods[$modname]->backup;
$preferences->mods[$mod->modname]->instances[$mod->instance]->userinfo = $preferences->mods[$modname]->userinfo;
// there isn't really a nice way to do this...
$preferences->mods[$mod->modname]->instances[$mod->instance]->name = get_field($mod->modname,'name','id',$mod->instance);
}
}
}
}
//Convert other parameters

0 comments on commit 9f23133

Please sign in to comment.
You can’t perform that action at this time.