]> git.mjollnir.org Git - moodle.git/commitdiff
accesslib. Improve comment.
authortjhunt <tjhunt>
Fri, 20 Mar 2009 07:41:49 +0000 (07:41 +0000)
committertjhunt <tjhunt>
Fri, 20 Mar 2009 07:41:49 +0000 (07:41 +0000)
lib/accesslib.php

index 7649541cf005c08751e669d88837181470e16984..121811b007d8cc9f3dad2ab52a80b7ecf720c360 100755 (executable)
@@ -5369,17 +5369,16 @@ function get_roles_on_exact_context($context) {
  *
  * The caller *must* check
  * - that this op is allowed
- * - that the requested role can be assigned in this ctx
- *   (hint, use get_assignable_roles_for_switchrole())
+ * - that the requested role can be switched to in this context (use get_switchable_roles)
  * - that the requested role is NOT $CFG->defaultuserroleid
  *
  * To "unswitch" pass 0 as the roleid.
  *
  * This function *will* modify $USER->access - beware
  *
- * @param integer $roleid
- * @param object $context
- * @return bool
+ * @param integer $roleid the role to switch to.
+ * @param object $context the context in which to perform the switch.
+ * @return bool success or failure.
  */
 function role_switch($roleid, $context) {
     global $USER;