MDL-58273 enrol_ldap: Fix the name of the capability
authorDavid Mudrák <david@moodle.com>
Wed, 15 Mar 2017 17:30:46 +0000 (18:30 +0100)
committerDavid Mudrák <david@moodle.com>
Wed, 15 Mar 2017 17:30:46 +0000 (18:30 +0100)
This capability controls who can hide/show the enrolment instance.

enrol/ldap/lib.php

index 8fa81d6..aafc0e7 100644 (file)
@@ -132,7 +132,7 @@ class enrol_ldap_plugin extends enrol_plugin {
      */
     public function can_hide_show_instance($instance) {
         $context = context_course::instance($instance->courseid);
      */
     public function can_hide_show_instance($instance) {
         $context = context_course::instance($instance->courseid);
-        return has_capability('enrol/ldap:config', $context);
+        return has_capability('enrol/ldap:manage', $context);
     }
 
     /**
     }
 
     /**