mirror of
https://github.com/moodle/moodle.git
synced 2025-02-27 05:22:33 +01:00
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.
31 lines
586 B
PHP
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;
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|