From: martinlanghoff Date: Wed, 19 Sep 2007 07:25:10 +0000 (+0000) Subject: accesslib: rm get_role_context_capability() and update phpdoc X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ad833c42830267aca3d8f0e168358f3f4353c503;p=moodle.git accesslib: rm get_role_context_capability() and update phpdoc Remove unused function. --- diff --git a/lib/accesslib.php b/lib/accesslib.php index 6d7ea1599e..366f2b959e 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -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.