mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
Merge branch 'MDL-81503-main' of https://github.com/aanabit/moodle
This commit is contained in:
commit
a7f6329e2e
@ -32,7 +32,29 @@ $sectionid = required_param('id', PARAM_INT);
|
||||
// This parameter is used by the classic theme to force editing on.
|
||||
$edit = optional_param('edit', -1, PARAM_BOOL);
|
||||
|
||||
$section = $DB->get_record('course_sections', ['id' => $sectionid], '*', MUST_EXIST);
|
||||
if (!$section = $DB->get_record('course_sections', ['id' => $sectionid], '*')) {
|
||||
$url = new moodle_url('/');
|
||||
$PAGE->set_context(\core\context\system::instance());
|
||||
$PAGE->set_url($url);
|
||||
$PAGE->set_pagelayout('course');
|
||||
$PAGE->add_body_classes(['limitedwidth', 'single-section-page']);
|
||||
$PAGE->set_title(get_string('notfound', 'error'));
|
||||
$PAGE->set_heading($SITE->fullname);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
$errortext = new \core\output\notification(
|
||||
get_string('sectioncantbefound', 'error'),
|
||||
\core\output\notification::NOTIFY_ERROR
|
||||
);
|
||||
echo $OUTPUT->render($errortext);
|
||||
|
||||
$button = new single_button($url, get_string('gobacktosite'), 'get', single_button::BUTTON_PRIMARY);
|
||||
$button->class = 'continuebutton';
|
||||
echo $OUTPUT->render($button);
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
die();
|
||||
}
|
||||
|
||||
// Defined here to avoid notices on errors.
|
||||
$PAGE->set_url('/course/section.php', ['id' => $sectionid]);
|
||||
|
@ -483,6 +483,7 @@ $string['nostartdatenoenddate'] = 'A course end date can only be set if a start
|
||||
$string['nostatstodisplay'] = 'Sorry, there is no available data to display';
|
||||
$string['notallowedtoupdateprefremotely'] = 'You are not allowed to update this user preference remotely';
|
||||
$string['notavailable'] = 'That is not currently available';
|
||||
$string['notfound'] = 'Not found';
|
||||
$string['notlocalisederrormessage'] = '{$a}';
|
||||
$string['notmemberofgroup'] = 'You are not a member of this course group';
|
||||
$string['notownerofkey'] = 'You are not owner of this key';
|
||||
@ -529,6 +530,7 @@ $string['restricteduser'] = 'Sorry, but your current account "{$a}" is restricte
|
||||
$string['reverseproxyabused'] = 'Reverse proxy enabled so the server cannot be accessed directly.<br />Please contact the server administrator.';
|
||||
$string['rpcerror'] = 'Ooops! Your MNET communication has failed! Here\'s that error message to pass on to your administrator: {$a}';
|
||||
$string['secretalreadyused'] = 'Change password confirmation link was already used, password was not changed';
|
||||
$string['sectioncantbefound'] = '<p><b>This content can\'t be found</b></p><p>It may have been deleted, or the URL may be incorrect.</p>';
|
||||
$string['sectionnotexist'] = 'This section does not exist';
|
||||
$string['sendmessage'] = 'Send message';
|
||||
$string['sendmessagesent'] = 'Thanks for your feedback about:<br>{$a}';
|
||||
|
@ -968,6 +968,7 @@ $string['general'] = 'General';
|
||||
$string['geolocation'] = 'latitude - longitude';
|
||||
$string['gettheselogs'] = 'Get these logs';
|
||||
$string['go'] = 'Go';
|
||||
$string['gobacktosite'] = 'Go back to site';
|
||||
$string['gpl'] = 'Copyright (C) 1999 onwards Martin Dougiamas (https://moodle.com)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
|
||||
|
Loading…
x
Reference in New Issue
Block a user