/**
  * Renders the confirmation stage screen
  *
  * @param core_backup_renderer $renderer renderer instance to use
  * @return string HTML code
  */
 public function display(core_backup_renderer $renderer)
 {
     $prevstageurl = new moodle_url('/backup/restorefile.php', array('contextid' => $this->contextid));
     $nextstageurl = new moodle_url('/backup/restore.php', array('contextid' => $this->contextid, 'filepath' => $this->filepath, 'stage' => restore_ui::STAGE_DESTINATION));
     $format = backup_general_helper::detect_backup_format($this->filepath);
     if ($format === backup::FORMAT_UNKNOWN) {
         // Unknown format - we can't do anything here.
         return $renderer->backup_details_unknown($prevstageurl);
     } else {
         if ($format !== backup::FORMAT_MOODLE) {
             // Non-standard format to be converted.
             $details = array('format' => $format, 'type' => backup::TYPE_1COURSE);
             // todo type to be returned by a converter
             return $renderer->backup_details_nonstandard($nextstageurl, $details);
         } else {
             // Standard MBZ backup, let us get information from it and display.
             $this->details = backup_general_helper::get_backup_information($this->filepath);
             return $renderer->backup_details($this->details, $nextstageurl);
         }
     }
 }