Skip to content

Commit

Permalink
MDL-14978 removed obsoleted iscreator()
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed May 25, 2008
1 parent c4d61f7 commit 4119bfe
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions lib/deprecatedlib.php
Expand Up @@ -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.
Expand Down

0 comments on commit 4119bfe

Please sign in to comment.