mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-31443 backup: Title and cancel messages stating import and restore
This commit is contained in:
parent
50e48a8f2d
commit
f55b45e473
@ -183,7 +183,11 @@ class backup_ui_stage_initial extends backup_ui_stage {
|
||||
foreach ($tasks as &$task) {
|
||||
// For the initial stage we are only interested in the root settings.
|
||||
if ($task instanceof backup_root_task) {
|
||||
$form->add_heading('rootsettings', get_string('rootsettings', 'backup'));
|
||||
if ($this->ui instanceof import_ui) {
|
||||
$form->add_heading('rootsettings', get_string('importrootsettings', 'backup'));
|
||||
} else {
|
||||
$form->add_heading('rootsettings', get_string('rootsettings', 'backup'));
|
||||
}
|
||||
$settings = $task->get_settings();
|
||||
// First add all settings except the filename setting.
|
||||
foreach ($settings as &$setting) {
|
||||
@ -469,7 +473,11 @@ class backup_ui_stage_confirmation extends backup_ui_stage {
|
||||
foreach ($tasks as $task) {
|
||||
if ($task instanceof backup_root_task) {
|
||||
// If its a backup root add a root settings heading to group nicely.
|
||||
$form->add_heading('rootsettings', get_string('rootsettings', 'backup'));
|
||||
if ($this->ui instanceof import_ui) {
|
||||
$form->add_heading('rootsettings', get_string('importrootsettings', 'backup'));
|
||||
} else {
|
||||
$form->add_heading('rootsettings', get_string('rootsettings', 'backup'));
|
||||
}
|
||||
} else if (!$courseheading) {
|
||||
// We haven't already add a course heading.
|
||||
$form->add_heading('coursesettings', get_string('includeditems', 'backup'));
|
||||
|
@ -383,7 +383,13 @@ abstract class base_moodleform extends moodleform {
|
||||
$this->require_definition_after_data();
|
||||
|
||||
$config = new stdClass;
|
||||
$config->title = get_string('confirmcancel', 'backup');
|
||||
if ($this->uistage->get_ui() instanceof import_ui) {
|
||||
$config->title = get_string('confirmcancelimport', 'backup');
|
||||
} else if ($this->uistage->get_ui() instanceof restore_ui) {
|
||||
$config->title = get_string('confirmcancelrestore', 'backup');
|
||||
} else {
|
||||
$config->title = get_string('confirmcancel', 'backup');
|
||||
}
|
||||
$config->question = get_string('confirmcancelquestion', 'backup');
|
||||
$config->yesLabel = get_string('confirmcancelyes', 'backup');
|
||||
$config->noLabel = get_string('confirmcancelno', 'backup');
|
||||
|
@ -125,7 +125,13 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$html .= html_writer::end_tag('div');
|
||||
|
||||
$html .= html_writer::start_tag('div', array('class' => 'backup-section settings-section'));
|
||||
$html .= $this->output->heading(get_string('backupsettings', 'backup'), 2, array('class' => 'header'));
|
||||
if ($this instanceof import_ui_stage_inital) {
|
||||
$html .= $this->output->heading(get_string('importrootsettings', 'backup'), 2, array('class' => 'header'));
|
||||
} else if ($this instanceof restore_ui_stage_settings) {
|
||||
$html .= $this->output->heading(get_string('restorerootsettings', 'backup'), 2, array('class' => 'header'));
|
||||
} else {
|
||||
$html .= $this->output->heading(get_string('backupsettings', 'backup'), 2, array('class' => 'header'));
|
||||
}
|
||||
foreach ($details->root_settings as $label => $value) {
|
||||
if ($label == 'filename' or $label == 'user_files') {
|
||||
continue;
|
||||
|
@ -120,6 +120,8 @@ $string['configrestoreroleassignments'] = 'If enabled by default roles assignmen
|
||||
$string['configrestoreuserscompletion'] = 'If enabled user completion information will be restored by default if it was included in the backup.';
|
||||
$string['configrestoreusers'] = 'Sets the default for whether to restore users if they were included in the backup.';
|
||||
$string['confirmcancel'] = 'Cancel backup';
|
||||
$string['confirmcancelrestore'] = 'Cancel restore';
|
||||
$string['confirmcancelimport'] = 'Cancel import';
|
||||
$string['confirmcancelquestion'] = 'Are you sure you wish to cancel?
|
||||
Any information you have entered will be lost.';
|
||||
$string['confirmcancelyes'] = 'Cancel';
|
||||
@ -198,6 +200,7 @@ $string['importcurrentstage2'] = 'Schema settings';
|
||||
$string['importcurrentstage4'] = 'Confirmation and review';
|
||||
$string['importcurrentstage8'] = 'Perform import';
|
||||
$string['importcurrentstage16'] = 'Complete';
|
||||
$string['importrootsettings'] = 'Import settings';
|
||||
$string['importsettings'] = 'General import settings';
|
||||
$string['importsuccess'] = 'Import complete. Click continue to return to the course.';
|
||||
$string['includeactivities'] = 'Include:';
|
||||
|
Loading…
x
Reference in New Issue
Block a user