Skip to content

Commit

Permalink
MDL-31500 backup: Warn users about front page backups
Browse files Browse the repository at this point in the history
They should know that they can only be restored on the front
page before selecting the destination course.
  • Loading branch information
David Monllao committed Nov 25, 2014
1 parent d62c556 commit 99e434f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backup/util/ui/renderer.php
Expand Up @@ -138,6 +138,10 @@ public function backup_details($details, $nextstageurl) {
$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) {
Expand Down
1 change: 1 addition & 0 deletions lang/en/backup.php
Expand Up @@ -238,6 +238,7 @@
$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';
Expand Down

0 comments on commit 99e434f

Please sign in to comment.