category) { require_login($course->id); } add_to_log($course->id, "user", "view", "view.php?id=$user->id&course=$course->id", "$user->id"); $fullname = "$user->firstname $user->lastname"; $personalprofile = get_string("personalprofile"); $participants = get_string("participants"); if ($course->category) { print_header("$personalprofile: $fullname", "$personalprofile: $fullname", "id\">$course->shortname -> id\">$participants -> $fullname", ""); } else { print_header("$personalprofile: $fullname", "$personalprofile: $fullname", "$fullname", ""); } if ($course->category and ! isguest() ) { if (!isstudent($course->id, $user->id) && !isteacher($course->id, $user->id)) { print_heading(get_string("notenrolled", "", $fullname)); print_footer($course); die; } } echo "
"; echo ""; echo "
body\" VALIGN=top>"; if ($user->picture) { echo "id/f1.jpg\">"; } else { echo ""; } echo ""; // Print name and edit button across top echo "
"; echo "

$fullname

"; echo "
"; if ($id == $USER->id and !isguest()) { echo "

"; echo ""; echo "id\">"; echo ""; echo "

"; } echo "
"; // Print the description if ($user->description) { echo "

".text_to_html($user->description)."


"; } // Print all the little details in a list echo "city or $user->country) { print_row(get_string("location").":", "$user->city, ".$COUNTRIES["$user->country"]); } if (isteacher($course->id)) { if ($user->address) { print_row(get_string("address").":", "$user->address"); } if ($user->phone1) { print_row(get_string("phone").":", "$user->phone1"); } if ($user->phone2) { print_row(get_string("phone").":", "$user->phone2"); } } print_row(get_string("email").":", "email\">$user->email"); if ($user->url) { print_row(get_string("webpage").":", "url\">$user->url"); } if ($user->icq) { print_row("ICQ:","icq\">$user->icq icq&img=5\" WIDTH=18 HEIGHT=18 BORDER=0>"); } $datestring = userdate($user->lastaccess)."  (".format_time(time() - $user->lastaccess).")"; print_row(get_string("lastaccess").":", $datestring); echo "
"; echo "
"; // Print other functions echo "
"; if (isteacher($course->id) or ($user->id == $USER->id and !isguest()) ) { echo ""; } if (isteacher($course->id)) { echo ""; echo ""; } echo "

"; echo "id\">"; echo "id\">"; echo "shortname)."\">"; echo "

"; echo "id\">"; echo "id\">"; echo ""; echo "

"; echo "id\">"; echo "id\">"; echo ""; echo "

\n"; forum_print_user_discussions($course->id, $user->id); print_footer($course); /// Functions /////// function print_row($left, $right) { echo "

$left

$right

"; } ?>