]> git.mjollnir.org Git - moodle.git/commitdiff
accesslib: rm get_role_context_capability() and update phpdoc
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:25:10 +0000 (07:25 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:25:10 +0000 (07:25 +0000)
Remove unused function.

lib/accesslib.php

index 6d7ea1599e94eae90f7cc96f1d92f384a1839935..366f2b959e0687e1fb5d591cf5c2b0e6d0daf7e7 100755 (executable)
@@ -35,6 +35,8 @@
  * - get_user_courses_bycap()
  * - get_context_users_bycap()
  * - get_parent_contexts()
+ * - enrol_into_course()
+ * - role_assign()/role_unassign()
  * - more?
  *
  * Advanced use
@@ -3507,25 +3509,6 @@ function get_related_contexts_string($context) {
     }
 }
 
-
-/**
- * This function gets the capability of a role in a given context.
- * It is needed when printing override forms.
- * @param int $contextid
- * @param string $capability
- * @param array $capabilities - array loaded using role_context_capabilities
- * @return int (allow, prevent, prohibit, inherit)
- */
-function get_role_context_capability($contextid, $capability, $capabilities) {
-    if (isset($capabilities[$contextid][$capability])) {
-        return $capabilities[$contextid][$capability];
-    }
-    else {
-        return false;
-    }
-}
-
-
 /**
  * Returns the human-readable, translated version of the capability.
  * Basically a big switch statement.