芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/public_html/cepali/course/tests/fixtures/course_capability_assignment.php
capability = $capability; $this->roleid = $roleid; $this->contextid = $contextid; $this->assign($permission); } /** * Assign a new permission. * @param int $permission One of CAP_ALLOW, CAP_PROHIBIT, CAP_PREVENT */ public function assign($permission) { foreach ($this->capability as $capability) { assign_capability($capability, $permission, $this->roleid, $this->contextid, true); } accesslib_clear_all_caches_for_unit_testing(); } /** * Revokes the capability assignment. */ public function revoke() { foreach ($this->capability as $capability) { unassign_capability($capability, $this->roleid, $this->contextid); } accesslib_clear_all_caches_for_unit_testing(); } }