/**
  * Displays the completed backup stage.
  *
  * Currently this just envolves redirecting to the file browser with an
  * appropriate message.
  *
  * @param core_backup_renderer $renderer
  * @return string HTML code to echo
  */
 public function display(core_backup_renderer $renderer)
 {
     $html = '';
     if (!empty($this->results['file_aliases_restore_failures'])) {
         $html .= $renderer->box_start('generalbox filealiasesfailures');
         $html .= $renderer->heading_with_help(get_string('filealiasesrestorefailures', 'core_backup'), 'filealiasesrestorefailures', 'core_backup');
         $html .= $renderer->container(get_string('filealiasesrestorefailuresinfo', 'core_backup'));
         $html .= $renderer->container_start('aliaseslist');
         $html .= html_writer::start_tag('ul');
         foreach ($this->results['file_aliases_restore_failures'] as $alias) {
             $html .= html_writer::tag('li', s($alias));
         }
         $html .= html_writer::end_tag('ul');
         $html .= $renderer->container_end();
         $html .= $renderer->box_end();
     }
     $html .= $renderer->box_start();
     if (array_key_exists('file_missing_in_backup', $this->results)) {
         $html .= $renderer->notification(get_string('restorefileweremissing', 'backup'), 'notifyproblem');
     }
     $html .= $renderer->notification(get_string('restoreexecutionsuccess', 'backup'), 'notifysuccess');
     $html .= $renderer->continue_button(new moodle_url('/course/view.php', array('id' => $this->get_ui()->get_controller()->get_courseid())), 'get');
     $html .= $renderer->box_end();
     return $html;
 }
 /**
  * Displays the completed backup stage.
  *
  * Currently this just involves redirecting to the file browser with an
  * appropriate message.
  *
  * @param core_backup_renderer $renderer
  * @return string HTML code to echo
  */
 public function display(core_backup_renderer $renderer)
 {
     // Get the resulting stored_file record
     $type = $this->get_ui()->get_controller()->get_type();
     $courseid = $this->get_ui()->get_controller()->get_courseid();
     switch ($type) {
         case 'activity':
             $cmid = $this->get_ui()->get_controller()->get_id();
             $cm = get_coursemodule_from_id(null, $cmid, $courseid);
             $modcontext = context_module::instance($cm->id);
             $restorerul = new moodle_url('/backup/restorefile.php', array('contextid' => $modcontext->id));
             break;
         case 'course':
         default:
             $coursecontext = context_course::instance($courseid);
             $restorerul = new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id));
     }
     $output = '';
     $output .= $renderer->box_start();
     if (!empty($this->results['include_file_references_to_external_content'])) {
         $output .= $renderer->notification(get_string('filereferencesincluded', 'backup'), 'notifyproblem');
     }
     if (!empty($this->results['missing_files_in_pool'])) {
         $output .= $renderer->notification(get_string('missingfilesinpool', 'backup'), 'notifyproblem');
     }
     $output .= $renderer->notification(get_string('executionsuccess', 'backup'), 'notifysuccess');
     $output .= $renderer->continue_button($restorerul);
     $output .= $renderer->box_end();
     return $output;
 }
 /**
  * Displays the completed backup stage.
  *
  * Currently this just envolves redirecting to the file browser with an
  * appropriate message.
  *
  * @param core_backup_renderer $renderer
  */
 public function display(core_backup_renderer $renderer)
 {
     $html = '';
     $html .= $renderer->box_start();
     $html .= $renderer->notification(get_string('restoreexecutionsuccess', 'backup'), 'notifysuccess');
     $html .= $renderer->continue_button(new moodle_url('/course/view.php', array('id' => $this->get_ui()->get_controller()->get_courseid())), 'get');
     $html .= $renderer->box_end();
     return $html;
 }
 /**
  * Displays the completed backup stage.
  *
  * Currently this just involves redirecting to the file browser with an
  * appropriate message.
  *
  * @param core_backup_renderer $renderer
  * @return string HTML code to echo
  */
 public function display(core_backup_renderer $renderer)
 {
     // Get the resulting stored_file record
     $type = $this->get_ui()->get_controller()->get_type();
     $courseid = $this->get_ui()->get_controller()->get_courseid();
     switch ($type) {
         case 'activity':
             $cmid = $this->get_ui()->get_controller()->get_id();
             $cm = get_coursemodule_from_id(null, $cmid, $courseid);
             $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
             $restorerul = new moodle_url('/backup/restorefile.php', array('contextid' => $modcontext->id));
             break;
         case 'course':
         default:
             $coursecontext = get_context_instance(CONTEXT_COURSE, $courseid);
             $restorerul = new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id));
     }
     $output = '';
     $output .= $renderer->box_start();
     $output .= $renderer->notification(get_string('executionsuccess', 'backup'), 'notifysuccess');
     $output .= $renderer->continue_button($restorerul);
     $output .= $renderer->box_end();
     return $output;
 }