]> git.mjollnir.org Git - moodle.git/commitdiff
Merged course listing fix from stable
authormoodler <moodler>
Wed, 15 Dec 2004 13:33:40 +0000 (13:33 +0000)
committermoodler <moodler>
Wed, 15 Dec 2004 13:33:40 +0000 (13:33 +0000)
course/category.php

index 86cfeb5f4bff0fa5873762b34a5ff71b23034988..0ec92c7bcd459f1b619dc98737086580bd94c7b0 100644 (file)
     unset($course);    // To avoid unwanted language effects later
 
     $courses = get_courses_page($category->id, 'c.sortorder ASC', 
-                                'c.id,c.sortorder,c.shortname,c.fullname,c.summary,c.visible,c.teacher', 
+                                'c.id,c.sortorder,c.shortname,c.fullname,c.summary,c.visible,c.teacher,c.guest,c.password', 
                                 $totalcount, $page*$perpage, $perpage);
     $numcourses = count($courses);
 
                 echo "</td>";
             } else {
                 echo "<td align=\"right\">";
-                if ($acourse->guest ) {
+                if (!empty($acourse->guest)) {
                     echo '<a href="view.php?id='.$acourse->id.'"><img hspace="2" title="'.
                          $strallowguests.'" alt="" height="16" width="16" border="0" src="'.
                          $pixpath.'/i/user.gif" /></a>';
                 }
-                if ($acourse->password) {
+                if (!empty($acourse->password)) {
                     echo '<a href="view.php?id='.$acourse->id.'"><img hspace="2" title="'.
                          $strrequireskey.'" alt="" height="16" width="16" border="0" src="'.
                          $pixpath.'/i/key.gif" /></a>';
                 }
-                if ($acourse->summary) {
+                if (!empty($acourse->summary)) {
                     link_to_popup_window ("/course/info.php?id=$acourse->id", "courseinfo", 
                                           '<img hspace="2" alt="info" height="16" width="16" border="0" src="'.$pixpath.'/i/info.gif" />', 
                                            400, 500, $strsummary);