MDL-49232 enrol_self: display continue button
This commit is contained in:
+2
-2
@@ -262,12 +262,12 @@ class enrol_self_plugin extends enrol_plugin {
|
||||
* @return bool|string true if successful, else error message or false.
|
||||
*/
|
||||
public function can_self_enrol(stdClass $instance, $checkuserenrolment = true) {
|
||||
global $DB, $USER, $CFG;
|
||||
global $CFG, $DB, $OUTPUT, $USER;
|
||||
|
||||
if ($checkuserenrolment) {
|
||||
if (isguestuser()) {
|
||||
// Can not enrol guest.
|
||||
return get_string('noguestaccess', 'enrol');
|
||||
return get_string('noguestaccess', 'enrol') . $OUTPUT->continue_button(get_login_url());
|
||||
}
|
||||
// Check if user is already enroled.
|
||||
if ($DB->get_record('user_enrolments', array('userid' => $USER->id, 'enrolid' => $instance->id))) {
|
||||
|
||||
Reference in New Issue
Block a user