Permalink
Browse files

Hide no-authority teachers from course listings too

  • Loading branch information...
1 parent a3f0817 commit 0c71c9ae0efe171f6349a5b4925293c93ca1ae8c martin committed Sep 1, 2002
Showing with 4 additions and 5 deletions.
  1. +4 −5 course/lib.php
View
@@ -217,13 +217,12 @@ function print_course($course) {
echo "<TD VALIGN=top WIDTH=50%>";
echo "<P><FONT SIZE=3><B><A TITLE=\"".get_string("entercourse")."\"
HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A></B></FONT></P>";
- if ($teachers = get_records_sql("SELECT u.* FROM user u, user_teachers t
- WHERE u.id = t.user AND t.course = '$course->id'
- ORDER BY t.authority ASC")) {
-
+ if ($teachers = get_course_teachers($course->id)) {
echo "<P><FONT SIZE=1>\n";
foreach ($teachers as $teacher) {
- echo "$course->teacher: <A HREF=\"$CFG->wwwroot/user/view.php?id=$teacher->id&course=$site->id\">$teacher->firstname $teacher->lastname</A><BR>";
+ if ($teacher->authority > 0) {
+ echo "$course->teacher: <A HREF=\"$CFG->wwwroot/user/view.php?id=$teacher->id&course=$site->id\">$teacher->firstname $teacher->lastname</A><BR>";
+ }
}
echo "</FONT></P>";
}

0 comments on commit 0c71c9a

Please sign in to comment.