]> git.mjollnir.org Git - moodle.git/commitdiff
Students now see a Change Password link under admin.
authormoodler <moodler>
Mon, 25 Aug 2003 17:53:47 +0000 (17:53 +0000)
committermoodler <moodler>
Mon, 25 Aug 2003 17:53:47 +0000 (17:53 +0000)
Guests see *nothing* now

course/lib.php

index 4de5e7c162e8d2802f9bb848e12e094911013104..38e04576d49a26bab39ef52887684c9d3ba3e935 100644 (file)
@@ -828,11 +828,19 @@ function print_course_admin_links($course, $width=180) {
             $adminicon[]="<img src=\"$modpixpath/forum/icon.gif\" height=16 width=16 alt=\"\">";
         }
 
-    } else {  // Students menu
+    } else if (!isguest()) {  // Students menu
         if ($course->showgrades) {
             $admindata[]="<a href=\"grade.php?id=$course->id\">".get_string("grades")."...</a>";
             $adminicon[]="<img src=\"$pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
         }
+        if ($CFG->auth == "email" or $CFG->auth == "none" or $CFG->auth == "manual") {
+            $admindata[]="<a href=\"$CFG->wwwroot/login/change_password.php?id=$course->id\">".
+                          get_string("changepassword")."...</a>";
+            $adminicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
+        } else if ($CFG->changepassword) {
+            $admindata[]="<a href=\"$CFG->changepassword\">".get_string("changepassword")."...</a>";
+            $adminicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
+        }
     } 
 
     if (!empty($admindata)) {