From ab1324e415c7e11afd9a8d039e3a3f5189ef3ccd Mon Sep 17 00:00:00 2001 From: julmis Date: Tue, 22 Jun 2004 18:34:35 +0000 Subject: [PATCH] $CFG->loginhttps changes, change password and admin user edit. --- user/view.php | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/user/view.php b/user/view.php index 1955bfc1a3..244e29a47e 100644 --- a/user/view.php +++ b/user/view.php @@ -21,7 +21,7 @@ if ($course->category) { require_login($course->id); - } else if ($CFG->forcelogin or !empty($CFG->forceloginforprofiles)) { + } else if ($CFG->forcelogin or !empty($CFG->forceloginforprofiles)) { if (isguest()) { redirect("$CFG->wwwroot/login/index.php"); } @@ -53,12 +53,12 @@ } if ($course->category) { - print_header("$personalprofile: $fullname", "$personalprofile: $fullname", - "id\">$course->shortname -> + print_header("$personalprofile: $fullname", "$personalprofile: $fullname", + "id\">$course->shortname -> id\">$participants -> $fullname", "", "", true, " ", navmenu($course)); } else { - print_header("$course->fullname: $personalprofile: $fullname", "$course->fullname", + print_header("$course->fullname: $personalprofile: $fullname", "$course->fullname", "$fullname", "", "", true, " ", navmenu($course)); } @@ -93,10 +93,15 @@ $currentuser = ($user->id == $USER->id); } if (($currentuser and !isguest()) or isadmin()) { - echo "

"; - echo ""; - echo "id\">"; - echo ""; + if(empty($CFG->loginhttps)) { + $wwwroot = $CFG->wwwroot; + } else { + $wwwroot = str_replace('http','https',$CFG->wwwroot); + } + echo "

"; + echo ""; + echo "id\" />"; + echo ""; echo "

"; } echo ""; @@ -129,8 +134,8 @@ } } - if ($user->maildisplay == 1 or - ($user->maildisplay == 2 and $course->category and !isguest()) or + if ($user->maildisplay == 1 or + ($user->maildisplay == 2 and $course->category and !isguest()) or isteacher($course->id)) { if (isteacheredit($course->id) or $currentuser) { /// Can use the enable/disable email stuff @@ -194,7 +199,11 @@ $internalpassword = false; if (is_internal_auth()) { + if(empty($CFG->loginhttps)) { $internalpassword = "$CFG->wwwroot/login/change_password.php"; + } else { + $internalpassword = str_replace('http','https',$CFG->wwwroot.'/login/change_password.php'); + } } // Print other functions @@ -211,8 +220,8 @@ echo "

"; } } - if ($course->category and - ((isstudent($course->id) and ($user->id == $USER->id) and !isguest() and $CFG->allowunenroll) or + if ($course->category and + ((isstudent($course->id) and ($user->id == $USER->id) and !isguest() and $CFG->allowunenroll) or (isteacheredit($course->id) and isstudent($course->id, $user->id))) ) { echo "

"; echo "id\">"; @@ -236,8 +245,8 @@ } echo "\n"; - $isseparategroups = ($course->groupmode == SEPARATEGROUPS and - $course->groupmodeforce and + $isseparategroups = ($course->groupmode == SEPARATEGROUPS and + $course->groupmodeforce and !isteacheredit($course->id)); $groupid = $isseparategroups ? get_current_group($course->id) : NULL; -- 2.39.5