MDL-14978 removed obsoleted iscreator()

This commit is contained in:
skodak
2008-05-25 11:02:58 +00:00
parent c4d61f7af0
commit 4119bfec09
-19
View File
@@ -119,25 +119,6 @@ function isteacherinanycourse($userid=0, $includeadmin=true) {
return false;
}
/**
* Determines if a user can create new courses
*
* @param int $userid The user being tested. You can set this to 0 or leave it blank to test the currently logged in user.
* @return bool
*/
function iscreator ($userid=0) {
global $CFG;
if (empty($CFG->rolesactive)) {
return false;
}
$context = get_context_instance(CONTEXT_SYSTEM);
return (has_capability('moodle/legacy:coursecreator', $context, $userid, false)
or has_capability('moodle/legacy:admin', $context, $userid, false));
}
/**
* Determines if the specified user is logged in as guest.