]> git.mjollnir.org Git - moodle.git/commitdiff
Changed to use the new functions for lists of students, teachers etc
authormartin <martin>
Mon, 29 Jul 2002 06:53:09 +0000 (06:53 +0000)
committermartin <martin>
Mon, 29 Jul 2002 06:53:09 +0000 (06:53 +0000)
user/index.php

index fa6a8e68cff2a37ecdfa788195efd4b753ef6f4c..d8e6535ebd5443e54ee15897bb85765a741646fa 100644 (file)
     $teacherlinks = isteacher($course->id);
 
 
-    if ( $teachers = get_records_sql("SELECT u.* FROM user u, user_teachers t 
-                                       WHERE t.course = '$course->id' AND t.user = u.id
-                                       ORDER BY t.authority")) {
+    if ( $teachers = get_course_teachers($course->id)) {
         echo "<H2 align=center>".$course->teacher."s</H2>";
         foreach ($teachers as $teacher) {
             print_user($teacher, $course, $teacherlinks);
         }
     }
 
-    if ($students = get_records_sql("SELECT u.* FROM user u, user_students s 
-                                       WHERE s.course = '$course->id' AND s.user = u.id
-                                       ORDER BY u.lastaccess DESC")) {
+    if ($students = get_course_students($course->id)) {
         echo "<H2 align=center>".$course->student."s</H2>";
         foreach ($students as $student) {
             print_user($student, $course, $teacherlinks);