]> git.mjollnir.org Git - moodle.git/commitdiff
Improved interface for course creators
authormoodler <moodler>
Sat, 9 Aug 2003 02:24:27 +0000 (02:24 +0000)
committermoodler <moodler>
Sat, 9 Aug 2003 02:24:27 +0000 (02:24 +0000)
course/category.php

index 2ef167a139a5906a4d780dc6bee399a1b407e227..791d28067331cb4a6aaa3530a40fe00b410c36a7 100644 (file)
             echo "<td><a $linkcss href=\"view.php?id=$course->id\">$course->fullname</a></td>";
             if ($creatorediting) {
                 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> ";
                 if ($adminediting) {
+                    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 "<a title=\"$strdelete\" href=\"delete.php?id=$course->id\"><img".
                          " src=\"$pixpath/t/delete.gif\" height=11 width=11 border=0></a> ";
                     if (!empty($course->visible)) {
                         echo "<a title=\"$strmovedown\" href=\"category.php?id=$category->id&movedown=$course->id\"><img".
                              " src=\"$pixpath/t/down.gif\" height=11 width=11 border=0></a> ";
                     }
-                }
     
-                echo "</td>";
-                echo "<td>";
-                popup_form ("category.php?id=$category->id&move=$course->id&moveto=", $displaylist, 
-                            "moveform$course->id", "$course->category", "", "", "", false);
+                    echo "</td>";
+                    echo "<td>";
+                    popup_form ("category.php?id=$category->id&move=$course->id&moveto=", $displaylist, 
+                                "moveform$course->id", "$course->category", "", "", "", false);
+                 } else if (isteacher($course->id)) {
+                    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 "</tr>";