moodle/mod/data/restorelib.php
mjollnir_ 1ecea97679 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.
2006-01-13 03:45:31 +00:00

31 lines
586 B
PHP

<?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;
}
?>