]> git.mjollnir.org Git - moodle.git/commitdiff
fix for MDL-9010, course request button should not appear when it is disabled
authortoyomoyo <toyomoyo>
Mon, 26 Mar 2007 05:50:55 +0000 (05:50 +0000)
committertoyomoyo <toyomoyo>
Mon, 26 Mar 2007 05:50:55 +0000 (05:50 +0000)
course/index.php

index 3985b13cfb1a86e6237f7d93e830c2314b0855cb..ee47002bc4c6883b4b8eb9c326651d13f6f38e15 100644 (file)
@@ -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