mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
fix for MDL-9010, course request button should not appear when it is disabled
This commit is contained in:
parent
1845e470a8
commit
de0d92e378
@ -60,7 +60,7 @@
|
||||
}
|
||||
|
||||
/// I am not sure this context in the next has_capability call is correct.
|
||||
if (isloggedin() and !isguest() and !has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) { // Print link to request a new course
|
||||
if (isloggedin() and !isguest() and !has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID)) and $CFG->enablecourserequests) { // Print link to request a new course
|
||||
print_single_button('request.php', NULL, get_string('courserequest'), 'get');
|
||||
}
|
||||
if (has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) { // Print link to create a new course
|
||||
|
Loading…
x
Reference in New Issue
Block a user