MDL-31500 backup: Warn users about front page backups

They should know that they can only be restored on the front
page before selecting the destination course.
This commit is contained in:
David Monllao 2014-11-25 10:26:15 +08:00
parent d62c556110
commit 99e434f2fa
2 changed files with 5 additions and 0 deletions

View File

@ -138,6 +138,10 @@ class core_backup_renderer extends plugin_renderer_base {
$html .= $this->backup_detail_pair(get_string('coursetitle', 'backup'), $details->course->title);
$html .= $this->backup_detail_pair(get_string('courseid', 'backup'), $details->course->courseid);
// Warning users about front page backups.
if ($details->original_course_format === 'site') {
$html .= $this->backup_detail_pair(get_string('type_format', 'plugin'), get_string('sitecourseformatwarning', 'backup'));
}
$html .= html_writer::start_tag('div', array('class'=>'backup-sub-section'));
$html .= $this->output->heading(get_string('backupcoursesections', 'backup'), 3, array('class'=>'subheader'));
foreach ($details->sections as $key=>$section) {

View File

@ -238,6 +238,7 @@ $string['rootsettinglogs'] = 'Include course logs';
$string['rootsettinggradehistories'] = 'Include grade history';
$string['rootsettingimscc1'] = 'Convert to IMS Common Cartridge 1.0';
$string['rootsettingimscc11'] = 'Convert to IMS Common Cartridge 1.1';
$string['sitecourseformatwarning'] = 'This is a front page backup, note that they can only be restored on the front page';
$string['storagecourseonly'] = 'Course backup filearea';
$string['storagecourseandexternal'] = 'Course backup filearea and the specified directory';
$string['storageexternalonly'] = 'Specified directory for automated backups';