Granular backup & restore:

This patch allows the much requested selection of individual instances of modules within a course to backup and restore.
It needs A LOT of testing and probably some prettyifying too.
This commit is contained in:
mjollnir_
2006-01-13 03:45:31 +00:00
parent 0f4e83c173
commit 1ecea97679
44 changed files with 2026 additions and 619 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
/* THIS IS A STUB RESTORELIB.PHP TO
* DEMONSTRATE THE NEW GRANULAR
* BACKUP/RESTORE API.
* IT NEEDS TO BE FILLED OUT!!!
*/
function data_restore_mods($mod,$restore) {
global $CFG;
$status = true;
// this all carries on exactly like normal except where checking for user data do
if (restore_userdata_selected($restore,'data',$mod->id)) {
// restore userdata, including files.
}
// instead of the old way:
// if ($restore->mods['data']->userinfo) {
// this should be the ONLY CHANGE IN THIS FILE.
return $status;
}
?>