]> git.mjollnir.org Git - moodle.git/commitdiff
Revert "course/lib: print_courses() - no need to worry about sitecourse"
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:50:28 +0000 (07:50 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:50:28 +0000 (07:50 +0000)
This reverts commit d7816749a4ceda352a2fac6e82d7f02f435473ed.

course/lib.php

index 62478e271d19435e3b13c35974bdde202aad3f7a..54eded80bd2d1873dbf72b89b97fb2d98de2a06f 100644 (file)
@@ -1776,9 +1776,9 @@ function print_courses($category, $hidesitecourse = false) {
                                             array('password','summary','currency'));
     }
 
-    if (count($courses) > 0) {
+    if ($courses) {
         foreach ($courses as $course) {
-            if ($hidesitecourse) {
+            if ($hidesitecourse and ($course->id == SITEID)) {
                 continue;
             }
             if ($course->visible == 1