]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14978 removed obsoleted get_group_users()
authorskodak <skodak>
Sun, 25 May 2008 11:00:59 +0000 (11:00 +0000)
committerskodak <skodak>
Sun, 25 May 2008 11:00:59 +0000 (11:00 +0000)
lib/deprecatedlib.php

index b99d486b1e330c781af5d915c99b3da20c9fea4d..5f50f3235c67da2b38b3cae828beca3c80b99fef 100644 (file)
@@ -628,39 +628,6 @@ function mygroupid($courseid) {
 }
 
 
-/**
- * Returns an array of user objects
- *
- * @uses $CFG
- * @param int $groupid The group in question.
- * @param string $sort ?
- * @param string $exceptions ?
- * @return object
- * @todo Finish documenting this function
- */
-function get_group_users($groupid, $sort='u.lastaccess DESC', $exceptions='',
-                         $fields='u.*') {
-    global $CFG;
-    if (!empty($exceptions)) {
-        $except = ' AND u.id NOT IN ('. $exceptions .') ';
-    } else {
-        $except = '';
-    }
-    // in postgres, you can't have things in sort that aren't in the select, so...
-    $extrafield = str_replace('ASC','',$sort);
-    $extrafield = str_replace('DESC','',$extrafield);
-    $extrafield = trim($extrafield);
-    if (!empty($extrafield)) {
-        $extrafield = ','.$extrafield;
-    }
-    return get_records_sql("SELECT DISTINCT $fields $extrafield
-                              FROM {$CFG->prefix}user u,
-                                   {$CFG->prefix}groups_members m
-                             WHERE m.groupid = '$groupid'
-                               AND m.userid = u.id $except
-                          ORDER BY $sort");
-}
-
 /**
  * Returns the current group mode for a given course or activity module
  *