Permalink
Browse files

Moved some functions around - no functonal difference

  • Loading branch information...
1 parent 9690be3 commit 3c720ccee1a1951d2d089b2a743b159ffae450e0 martin committed Jul 29, 2002
Showing with 19 additions and 19 deletions.
  1. +19 −19 lib/moodlelib.php
View
@@ -948,25 +948,6 @@ function isguest($userid=0) {
return record_exists_sql("SELECT * FROM user WHERE user='$userid' AND username = 'guest' ");
}
-function get_course_students($courseid, $sort="u.lastaccess DESC") {
- return get_records_sql("SELECT u.* FROM user u, user_students s
- WHERE s.course = '$courseid' AND s.user = u.id
- ORDER BY $sort");
-}
-
-function get_course_teachers($courseid, $sort="t.authority ASC") {
- return get_records_sql("SELECT u.* FROM user u, user_teachers t
- WHERE t.course = '$courseid' AND t.user = u.id
- ORDER BY $sort");
-}
-
-function get_course_users($courseid, $sort="u.lastaccess DESC") {
- return get_records_sql("SELECT u.* FROM user u, user_students s, user_teachers t
- WHERE (s.course = '$courseid' AND s.user = u.id) OR
- (t.course = '$courseid' AND t.user = u.id)
- ORDER BY $sort");
-}
-
function reset_login_count() {
global $SESSION;
@@ -1038,6 +1019,25 @@ function get_teacher($courseid) {
}
}
+function get_course_students($courseid, $sort="u.lastaccess DESC") {
+ return get_records_sql("SELECT u.* FROM user u, user_students s
+ WHERE s.course = '$courseid' AND s.user = u.id
+ ORDER BY $sort");
+}
+
+function get_course_teachers($courseid, $sort="t.authority ASC") {
+ return get_records_sql("SELECT u.* FROM user u, user_teachers t
+ WHERE t.course = '$courseid' AND t.user = u.id
+ ORDER BY $sort");
+}
+
+function get_course_users($courseid, $sort="u.lastaccess DESC") {
+ return get_records_sql("SELECT u.* FROM user u, user_students s, user_teachers t
+ WHERE (s.course = '$courseid' AND s.user = u.id) OR
+ (t.course = '$courseid' AND t.user = u.id)
+ ORDER BY $sort");
+}
+
/// MODULE FUNCTIONS /////////////////////////////////////////////////

0 comments on commit 3c720cc

Please sign in to comment.