mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
Merge branch 'MDL-79781' of https://github.com/paulholden/moodle
This commit is contained in:
commit
e537b5c913
@ -110,8 +110,14 @@ if (empty($pending)) {
|
|||||||
echo $OUTPUT->heading(get_string('nopendingcourses'));
|
echo $OUTPUT->heading(get_string('nopendingcourses'));
|
||||||
} else {
|
} else {
|
||||||
echo $OUTPUT->heading(get_string('coursespending'));
|
echo $OUTPUT->heading(get_string('coursespending'));
|
||||||
$role = $DB->get_record('role', array('id' => $CFG->creatornewroleid), '*', MUST_EXIST);
|
|
||||||
echo $OUTPUT->notification(get_string('courserequestwarning', 'core', role_get_name($role)), 'notifyproblem');
|
$role = $DB->get_record('role', ['id' => $CFG->creatornewroleid]);
|
||||||
|
if ($role) {
|
||||||
|
echo $OUTPUT->notification(get_string('courserequestwarning', 'core', role_get_name($role)), 'notifyproblem');
|
||||||
|
} else {
|
||||||
|
$userpoliciesurl = new moodle_url('/admin/settings.php', ['section' => 'userpolicies']);
|
||||||
|
echo $OUTPUT->notification(get_string('courserequestroleerror', 'core', (string) $userpoliciesurl), 'notifyerror');
|
||||||
|
}
|
||||||
|
|
||||||
/// Build a table of all the requests.
|
/// Build a table of all the requests.
|
||||||
$table = new html_table();
|
$table = new html_table();
|
||||||
|
@ -413,6 +413,7 @@ $string['courserequestdetails'] = 'Details of the course you are requesting';
|
|||||||
$string['courserequestfailed'] = 'For some reason, your course request could not be saved';
|
$string['courserequestfailed'] = 'For some reason, your course request could not be saved';
|
||||||
$string['courserequestintro'] = 'Use this form to request a course to be created for you.<br />Try and fill in as much information as you can to allow<br />the administrators to understand your reasons for wanting this course.';
|
$string['courserequestintro'] = 'Use this form to request a course to be created for you.<br />Try and fill in as much information as you can to allow<br />the administrators to understand your reasons for wanting this course.';
|
||||||
$string['courserequestreason'] = 'Reasons for wanting this course';
|
$string['courserequestreason'] = 'Reasons for wanting this course';
|
||||||
|
$string['courserequestroleerror'] = 'The creators\' role in new courses configuration is invalid. Please see <a href="{$a}">user policies</a>.';
|
||||||
$string['courserequestsuccess'] = 'Your course request has been saved successfully. You will be sent an email to inform you whether your request was approved.';
|
$string['courserequestsuccess'] = 'Your course request has been saved successfully. You will be sent an email to inform you whether your request was approved.';
|
||||||
$string['courserequestsupport'] = 'Supporting information to help the administrator evaluate this request';
|
$string['courserequestsupport'] = 'Supporting information to help the administrator evaluate this request';
|
||||||
$string['courserequestwarning'] = 'The user requesting this course will be automatically enrolled and assigned the role of {$a}.';
|
$string['courserequestwarning'] = 'The user requesting this course will be automatically enrolled and assigned the role of {$a}.';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user