Students now see a Change Password link under admin.

Guests see *nothing* now
This commit is contained in:
moodler 2003-08-25 17:53:47 +00:00
parent 61a5e1e902
commit e550e2d694

View 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)) {