From: martin Date: Wed, 14 Aug 2002 01:51:58 +0000 (+0000) Subject: Tidied up headers of user/edit.php X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7cbb4c96db50a4c7b07905dfa078b99320c72426;p=moodle.git Tidied up headers of user/edit.php --- diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 58608f234c..2b757563c7 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -222,6 +222,7 @@ Cheers from the '\$a->sitename' administrator, \$a->signoff\n"; $string[newpicture] = "New picture"; +$string[newuser] = "New user"; $string[newusers] = "New users"; $string[newsitem] = "news item"; $string[newsitems] = "news items"; diff --git a/user/edit.php b/user/edit.php index d3999fa6d1..3de6d84516 100644 --- a/user/edit.php +++ b/user/edit.php @@ -149,16 +149,27 @@ $editmyprofile = get_string("editmyprofile"); $participants = get_string("participants"); - if ($course->category) { - print_header("$course->fullname: $editmyprofile", "$course->fullname: $editmyprofile", - "wwwroot/course/view.php?id=$course->id\">$course->shortname - -> id\">$participants - -> id&course=$course->id\">$user->firstname $user->lastname - -> $editmyprofile", ""); + if ($user->firstname and $user->lastname) { + $userfullname = "$user->firstname $user->lastname"; + if ($course->category) { + print_header("$course->fullname: $editmyprofile", "$course->fullname: $editmyprofile", + "wwwroot/course/view.php?id=$course->id\">$course->shortname + -> id\">$participants + -> id&course=$course->id\">$userfullname + -> $editmyprofile", ""); + } else { + print_header("$course->fullname: $editmyprofile", "$course->fullname", + "id&course=$course->id\">$userfullname + -> $editmyprofile", ""); + } } else { + $userfullname = get_string("newuser"); + $straddnewuser = get_string("addnewuser"); + + $stradministration = get_string("administration"); print_header("$course->fullname: $editmyprofile", "$course->fullname", - "id&course=$course->id\">$user->firstname $user->lastname - -> $editmyprofile", ""); + "wwwroot/admin\">$stradministration -> + $straddnewuser", ""); } $teacher = strtolower($course->teacher); @@ -167,7 +178,7 @@ } print_simple_box_start("center", "", "$THEME->cellheading"); - print_heading( get_string("userprofilefor", "", "$user->firstname $user->lastname") ); + print_heading( get_string("userprofilefor", "", "$userfullname") ); include("edit.html"); print_simple_box_end(); print_footer($course);