Merge branch 'wip-mdl-25432' of git://github.com/rajeshtaneja/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2012-02-21 02:10:10 +01:00
2 changed files with 18 additions and 5 deletions
+16 -5
View File
@@ -123,12 +123,23 @@ abstract class backup_plan_builder {
// Add the activity task, responsible for outputting
// all the module related information
$plan->add_task(backup_factory::get_backup_activity_task($controller->get_format(), $id));
try {
$plan->add_task(backup_factory::get_backup_activity_task($controller->get_format(), $id));
// For the given activity, add as many block tasks as necessary
$blockids = backup_plan_dbops::get_blockids_from_moduleid($id);
foreach ($blockids as $blockid) {
$plan->add_task(backup_factory::get_backup_block_task($controller->get_format(), $blockid, $id));
// For the given activity, add as many block tasks as necessary
$blockids = backup_plan_dbops::get_blockids_from_moduleid($id);
foreach ($blockids as $blockid) {
try {
$plan->add_task(backup_factory::get_backup_block_task($controller->get_format(), $blockid, $id));
} catch (backup_task_exception $e) {
$a = stdClass();
$a->mid = $id;
$a->bid = $blockid;
$controller->log(get_string('error_block_for_module_not_found', 'backup', $a), backup::LOG_WARNING);
}
}
} catch (backup_task_exception $e) {
$controller->log(get_string('error_course_module_not_found', 'backup', $id), backup::LOG_WARNING);
}
}
+2
View File
@@ -106,6 +106,8 @@ $string['currentstage8'] = 'Perform backup';
$string['currentstage16'] = 'Complete';
$string['dependenciesenforced'] = 'Your settings have been altered due to unmet dependencies';
$string['enterasearch'] = 'Enter a search';
$string['error_block_for_module_not_found'] = 'Orphan block instance (id: {$a->bid}) for course module (id: {$a->mid}) found. This block will not be backed up';
$string['error_course_module_not_found'] = 'Orphan course module (id: {$a}) found. This module will not be backed up.';
$string['errorfilenamerequired'] = 'You must enter a valid filename for this backup';
$string['errorfilenamemustbezip'] = 'The filename you enter must be a ZIP file and have the .mbz extension';
$string['errorminbackup20version'] = 'This backup file has been created with one development version of Moodle backup ({$a->backup}). Minimum required is {$a->min}. Cannot be restored.';