]> git.mjollnir.org Git - moodle.git/commitdiff
Tidied up headers of user/edit.php
authormartin <martin>
Wed, 14 Aug 2002 01:51:58 +0000 (01:51 +0000)
committermartin <martin>
Wed, 14 Aug 2002 01:51:58 +0000 (01:51 +0000)
lang/en/moodle.php
user/edit.php

index 58608f234ca793c4e8696fa93fbe40dd7df2653f..2b757563c77a713e74f58b187379324488aab8fb 100644 (file)
@@ -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";
index d3999fa6d12b8c47c3b878abdc48c48400f65d96..3de6d84516e8926a6677d1c54e90dfac85f7fad6 100644 (file)
     $editmyprofile = get_string("editmyprofile");
     $participants = get_string("participants");
 
-    if ($course->category) {
-           print_header("$course->fullname: $editmyprofile", "$course->fullname: $editmyprofile",
-                    "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> 
-                    -> <A HREF=\"index.php?id=$course->id\">$participants</A>
-                    -> <A HREF=\"view.php?id=$user->id&course=$course->id\">$user->firstname $user->lastname</A> 
-                    -> $editmyprofile", "");
+    if ($user->firstname and $user->lastname) {
+        $userfullname = "$user->firstname $user->lastname";
+        if ($course->category) {
+               print_header("$course->fullname: $editmyprofile", "$course->fullname: $editmyprofile",
+                        "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> 
+                        -> <A HREF=\"index.php?id=$course->id\">$participants</A>
+                        -> <A HREF=\"view.php?id=$user->id&course=$course->id\">$userfullname</A> 
+                        -> $editmyprofile", "");
+        } else {
+               print_header("$course->fullname: $editmyprofile", "$course->fullname",
+                         "<A HREF=\"view.php?id=$user->id&course=$course->id\">$userfullname</A> 
+                          -> $editmyprofile", "");
+        }
     } else {
+        $userfullname = get_string("newuser");
+        $straddnewuser = get_string("addnewuser");
+
+        $stradministration = get_string("administration");
            print_header("$course->fullname: $editmyprofile", "$course->fullname",
-                     "<A HREF=\"view.php?id=$user->id&course=$course->id\">$user->firstname $user->lastname</A> 
-                      -> $editmyprofile", "");
+                     "<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> ->
+                      $straddnewuser", "");
     }
 
     $teacher = strtolower($course->teacher);
     }
 
     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);