]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14617 removed isteacheredit() - yay!
authorskodak <skodak>
Thu, 1 May 2008 22:35:36 +0000 (22:35 +0000)
committerskodak <skodak>
Thu, 1 May 2008 22:35:36 +0000 (22:35 +0000)
lib/deprecatedlib.php

index d4a13548713a0e21ab0ec5796a23c5b50a5c3ce5..d42c54ea9ca7c5a446f470a77115ed4ec0821957 100644 (file)
@@ -151,30 +151,6 @@ function isteacherinanycourse($userid=0, $includeadmin=true) {
     return false;
 }
 
-/**
- * Determines if a user is allowed to edit a given course
- *
- * @param int $courseid The id of the course that is being edited
- * @param int $userid The id of the user that is being tested against. Set this to 0 if you would just like to test against the currently logged in user.
- * @return bool
- */
-function isteacheredit($courseid, $userid=0, $obsolete_ignorestudentview=false) {
-    global $CFG;
-
-    if (empty($CFG->rolesactive)) {
-        return false;
-    }
-
-    if (empty($courseid)) {
-        $context = get_context_instance(CONTEXT_SYSTEM);
-    } else {
-        $context = get_context_instance(CONTEXT_COURSE, $courseid);
-    }
-
-    return (has_capability('moodle/legacy:editingteacher', $context, $userid, false)
-         or has_capability('moodle/legacy:admin', $context, $userid, false));
-}
-
 /**
  * Determines if a user can create new courses
  *