]> git.mjollnir.org Git - moodle.git/commitdiff
Show course access (guest, password etc) on non-editing screens
authormoodler <moodler>
Mon, 11 Aug 2003 05:38:28 +0000 (05:38 +0000)
committermoodler <moodler>
Mon, 11 Aug 2003 05:38:28 +0000 (05:38 +0000)
course/category.php
lang/en/moodle.php

index 14819b44aca9ea18efe6507350c50b3cd8aed300..bac0ae985ea9982603832ead45f8c259667c7482 100644 (file)
     } else {
 
         $strcourses  = get_string("courses");
-        $strmove     = get_string("move");
+        $strselect   = get_string("select");
         $stredit     = get_string("edit");
         $strdelete   = get_string("delete");
         $strbackup   = get_string("backup");
         $strhide     = get_string("hide");
         $strshow     = get_string("show");
         $strassignteachers     = get_string("assignteachers");
+        $strallowguests     = get_string("allowguests");
+        $strrequireskey     = get_string("requireskey");
 
         if (empty($THEME->custompix)) {
             $pixpath = "$CFG->wwwroot/pix";
         if ($creatorediting) {
             echo "<th>$stredit</th>";
             if ($adminediting) {
-                echo "<th>$strmove</th>";
+                echo "<th>$strselect</th>";
             }
+        } else {
+            echo "<th>&nbsp;</th>";
         }
         echo "</tr>";
 
                     echo "<input type=\"checkbox\" name=\"c$course->id\">";
                     $abletomovecourses = true;
 
-                 } else if (isteacher($course->id)) {
+                } else if (isteacher($course->id)) {
                     echo "<td>";
                     echo "<a title=\"$strassignteachers\" href=\"$CFG->wwwroot/$CFG->admin/teacher.php?id=$course->id\"><img".
                          " src=\"$pixpath/t/user.gif\" height=11 width=11 border=0></a> ";
-                 }
-                 echo "</td>";
+                }
+                echo "</td>";
+            } else {
+                echo "<td>";
+                if ($course->guest ) {
+                echo "<img title=\"$strallowguests\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/user.gif\">";
+                }
+                if ($course->password) {
+                    echo "<img title=\"$strrequireskey\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/key.gif\">";
+                }
+                echo "</td>";
             }
             echo "</tr>";
         }
index 9c06396366b532a48d40827f04268560552538aa..c7e5b031a7348007d901db8a2fe4a6c343958da1 100644 (file)
@@ -632,6 +632,7 @@ $string['sec'] = "sec";
 $string['secs'] = "secs";
 $string['section'] = "Section";
 $string['sections'] = "Sections";
+$string['select'] = "Select";
 $string['selectacountry'] = "Select a country";
 $string['selectednowmove'] = "\$a files selected for moving. Now go to the destination and press 'Move files to here'";
 $string['senddetails'] = "Send my details via email";