Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 132... Línea 132...
132
        $html .= $this->backup_detail_pair(get_string('backuptype', 'backup'), get_string('backuptype'.$details->type, 'backup'));
132
        $html .= $this->backup_detail_pair(get_string('backuptype', 'backup'), get_string('backuptype'.$details->type, 'backup'));
133
        $html .= $this->backup_detail_pair(get_string('backupformat', 'backup'), get_string('backupformat'.$details->format, 'backup'));
133
        $html .= $this->backup_detail_pair(get_string('backupformat', 'backup'), get_string('backupformat'.$details->format, 'backup'));
134
        $html .= $this->backup_detail_pair(get_string('backupmode', 'backup'), get_string('backupmode'.$details->mode, 'backup'));
134
        $html .= $this->backup_detail_pair(get_string('backupmode', 'backup'), get_string('backupmode'.$details->mode, 'backup'));
135
        $html .= $this->backup_detail_pair(get_string('backupdate', 'backup'), userdate($details->backup_date));
135
        $html .= $this->backup_detail_pair(get_string('backupdate', 'backup'), userdate($details->backup_date));
136
        $html .= $this->backup_detail_pair(get_string('moodleversion', 'backup'),
136
        $html .= $this->backup_detail_pair(get_string('moodleversion', 'backup'),
137
                html_writer::tag('span', $details->moodle_release, array('class' => 'moodle_release')).
137
                html_writer::tag('span', s($details->moodle_release), array('class' => 'moodle_release')).
138
                html_writer::tag('span', '['.$details->moodle_version.']', array('class' => 'moodle_version sub-detail')));
138
                html_writer::tag('span', '[' . s($details->moodle_version) .']', array('class' => 'moodle_version sub-detail')));
139
        $html .= $this->backup_detail_pair(get_string('backupversion', 'backup'),
139
        $html .= $this->backup_detail_pair(get_string('backupversion', 'backup'),
140
                html_writer::tag('span', $details->backup_release, array('class' => 'moodle_release')).
140
                html_writer::tag('span', s($details->backup_release), array('class' => 'moodle_release')).
141
                html_writer::tag('span', '['.$details->backup_version.']', array('class' => 'moodle_version sub-detail')));
141
                html_writer::tag('span', '[' . s($details->backup_version) . ']', array('class' => 'moodle_version sub-detail')));
142
        $html .= $this->backup_detail_pair(get_string('originalwwwroot', 'backup'),
142
        $html .= $this->backup_detail_pair(get_string('originalwwwroot', 'backup'),
143
                html_writer::tag('span', $details->original_wwwroot, array('class' => 'originalwwwroot')).
143
                html_writer::tag('span', s($details->original_wwwroot), array('class' => 'originalwwwroot')).
144
                html_writer::tag('span', '['.$details->original_site_identifier_hash.']', array('class' => 'sitehash sub-detail')));
144
                html_writer::tag('span', '[' . s($details->original_site_identifier_hash) . ']', array('class' => 'sitehash sub-detail')));
145
        if (!empty($details->include_file_references_to_external_content)) {
145
        if (!empty($details->include_file_references_to_external_content)) {
146
            $message = '';
146
            $message = '';
147
            if (backup_general_helper::backup_is_samesite($details)) {
147
            if (backup_general_helper::backup_is_samesite($details)) {
148
                $message = $yestick . ' ' . get_string('filereferencessamesite', 'backup');
148
                $message = $yestick . ' ' . get_string('filereferencessamesite', 'backup');
149
            } else {
149
            } else {
Línea 167... Línea 167...
167
 
167
 
168
        if ($details->type === 'course') {
168
        if ($details->type === 'course') {
169
            $html .= html_writer::start_tag('div', ['class' => 'backup-section',
169
            $html .= html_writer::start_tag('div', ['class' => 'backup-section',
170
                    'role' => 'table', 'aria-labelledby' => 'backupcoursedetailsheader']);
170
                    'role' => 'table', 'aria-labelledby' => 'backupcoursedetailsheader']);
171
            $html .= $this->output->heading(get_string('backupcoursedetails', 'backup'), 2, 'header', 'backupcoursedetailsheader');
171
            $html .= $this->output->heading(get_string('backupcoursedetails', 'backup'), 2, 'header', 'backupcoursedetailsheader');
172
            $html .= $this->backup_detail_pair(get_string('coursetitle', 'backup'), $details->course->title);
172
            $html .= $this->backup_detail_pair(get_string('coursetitle', 'backup'), format_string($details->course->title));
Línea 173... Línea 173...
173
            $html .= $this->backup_detail_pair(get_string('courseid', 'backup'), $details->course->courseid);
173
            $html .= $this->backup_detail_pair(get_string('courseid', 'backup'), clean_param($details->course->courseid, PARAM_INT));
174
 
174
 
175
            // Warning users about front page backups.
175
            // Warning users about front page backups.
176
            if ($details->original_course_format === 'site') {
176
            if ($details->original_course_format === 'site') {
Línea 186... Línea 186...
186
                } else if ($section->settings[$included]) {
186
                } else if ($section->settings[$included]) {
187
                    $value = get_string('sectioninc', 'backup');
187
                    $value = get_string('sectioninc', 'backup');
188
                } else {
188
                } else {
189
                    continue;
189
                    continue;
190
                }
190
                }
191
                $html .= $this->backup_detail_pair(get_string('backupcoursesection', 'backup', $section->title), $value);
191
                $html .= $this->backup_detail_pair(get_string('backupcoursesection', 'backup', format_string($section->title)), $value);
192
                $table = null;
192
                $table = null;
193
                foreach ($details->activities as $activitykey => $activity) {
193
                foreach ($details->activities as $activitykey => $activity) {
194
                    if ($activity->sectionid != $section->sectionid) {
194
                    if ($activity->sectionid != $section->sectionid) {
195
                        continue;
195
                        continue;
196
                    }
196
                    }
Línea 204... Línea 204...
204
                    }
204
                    }
205
                    $name = get_string('pluginname', $activity->modulename);
205
                    $name = get_string('pluginname', $activity->modulename);
206
                    $icon = new image_icon('monologo', '', $activity->modulename, ['class' => 'iconlarge icon-pre']);
206
                    $icon = new image_icon('monologo', '', $activity->modulename, ['class' => 'iconlarge icon-pre']);
207
                    $table->data[] = array(
207
                    $table->data[] = array(
208
                        $this->output->render($icon).$name,
208
                        $this->output->render($icon).$name,
209
                        $activity->title,
209
                        format_string($activity->title),
210
                        ($activity->settings[$activitykey.'_userinfo']) ? $yestick : $notick,
210
                        ($activity->settings[$activitykey.'_userinfo']) ? $yestick : $notick,
211
                    );
211
                    );
212
                }
212
                }
213
                if (!empty($table)) {
213
                if (!empty($table)) {
214
                    $html .= $this->backup_detail_pair(get_string('sectionactivities', 'backup'), html_writer::table($table));
214
                    $html .= $this->backup_detail_pair(get_string('sectionactivities', 'backup'), html_writer::table($table));
Línea 520... Línea 520...
520
     * @return string
520
     * @return string
521
     */
521
     */
522
    public function substage_buttons($haserrors) {
522
    public function substage_buttons($haserrors) {
523
        $output  = html_writer::start_tag('div', array('continuebutton'));
523
        $output  = html_writer::start_tag('div', array('continuebutton'));
524
        if (!$haserrors) {
524
        if (!$haserrors) {
525
            $attrs = array('type' => 'submit', 'value' => get_string('continue'), 'class' => 'btn btn-primary');
525
            $attrs = ['type' => 'submit', 'value' => get_string('continue'), 'class' => 'btn btn-primary mr-1'];
526
            $output .= html_writer::empty_tag('input', $attrs);
526
            $output .= html_writer::empty_tag('input', $attrs);
527
        }
527
        }
528
        $attrs = array('type' => 'submit', 'name' => 'cancel', 'value' => get_string('cancel'), 'class' => 'btn btn-secondary');
528
        $attrs = array('type' => 'submit', 'name' => 'cancel', 'value' => get_string('cancel'), 'class' => 'btn btn-secondary');
529
        $output .= html_writer::empty_tag('input', $attrs);
529
        $output .= html_writer::empty_tag('input', $attrs);
530
        $output .= html_writer::end_tag('div');
530
        $output .= html_writer::end_tag('div');