From 1b6a4b1db266e208e23d0eda317f522229c9d945 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 21 Oct 2003 06:40:39 +0000 Subject: [PATCH] Some cleanups for some of the HTML, including addition of new styles --- course/lib.php | 6 ++-- user/index.php | 2 +- user/lib.php | 41 +++++++++++----------- user/view.php | 92 +++++++++++++++++++++++++------------------------- 4 files changed, 70 insertions(+), 71 deletions(-) diff --git a/course/lib.php b/course/lib.php index a2a482f879..05efc50899 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1138,13 +1138,13 @@ function print_course($course, $width="100%") { error("Could not find a site!"); } - print_simple_box_start("center", "$width"); + print_simple_box_start("center", "$width", $THEME->cellcontent, 5, "coursebox"); $linkcss = $course->visible ? "" : " class=\"dimmed\" "; echo ""; echo ""; - echo ""; echo "
"; + echo ""; echo "

wwwroot/course/view.php?id=$course->id\">$course->fullname

"; if ($teachers = get_course_teachers($course->id)) { @@ -1171,7 +1171,7 @@ function print_course($course, $width="100%") { } - echo "
"; + echo ""; echo "

".text_to_html($course->summary)."

"; echo "
"; diff --git a/user/index.php b/user/index.php index e46dcd3bc9..4ce1a9c556 100644 --- a/user/index.php +++ b/user/index.php @@ -139,7 +139,7 @@ $table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT"); $table->size = array ("10", "*", "*", "*", "*"); $table->size = array ("10", "*", "*", "*", "*"); - $table->cellpadding = 2; + $table->cellpadding = 4; $table->cellspacing = 0; foreach ($students as $student) { diff --git a/user/lib.php b/user/lib.php index 36b3be6197..2bbd422d41 100644 --- a/user/lib.php +++ b/user/lib.php @@ -171,26 +171,25 @@ function save_user_image($userid, $filename) { function print_user($user, $course, $string, $countries) { +/// Prints a summary of a user in a nice little box - global $USER; - - echo "
"; - echo ""; - echo "
"; + echo ""; + echo ""; + echo "
"; print_user_picture($user->id, $course->id, $user->picture, true); - echo ""; - echo ""; - echo ""; - echo "$user->firstname $user->lastname"; - echo "

"; + echo ""; + echo "

"; + echo ""; + echo "$user->firstname $user->lastname"; + echo "

"; if (!empty($user->role) and ($user->role <> $course->teacher)) { - echo "$string->role: $user->role
"; + echo "$string->role: $user->role
"; } if ($user->maildisplay == 1 or ($user->maildisplay == 2 and $course->category) or isteacher($course->id)) { - echo "$string->email: email\">$user->email
"; + echo "$string->email: email\">$user->email
"; } if ($user->city or $user->country) { - echo "$string->location: $user->city, ".$countries["$user->country"]."
"; + echo "$string->location: $user->city, ".$countries["$user->country"]."
"; } if ($user->lastaccess) { echo "$string->lastaccess: ".userdate($user->lastaccess); @@ -198,21 +197,21 @@ function print_user($user, $course, $string, $countries) { } else { echo "$string->lastaccess: $string->never"; } - echo "

"; + echo ""; - echo ""; + echo ""; if (isteacher($course->id)) { $timemidnight = usergetmidnight(time()); - echo "id&user=$user->id\">$string->activity
"; + echo "id&user=$user->id\">$string->activity
"; if (isstudent($course->id, $user->id)) { - echo "id&user=$user->id\">$string->unenrol
"; - echo "id&user=$user->id\">$string->loginas
"; + echo "id&user=$user->id\">$string->unenrol
"; + echo "id&user=$user->id\">$string->loginas
"; } } - echo "id&course=$course->id\">$string->fullprofile..."; - echo "
"; + echo "id&course=$course->id\">$string->fullprofile..."; + echo "
"; - echo "
"; + echo "
"; } ?> diff --git a/user/view.php b/user/view.php index 7b3d8a028a..91c9d7ecee 100644 --- a/user/view.php +++ b/user/view.php @@ -34,8 +34,8 @@ if ($course->category) { print_header("$personalprofile: $fullname", "$personalprofile: $fullname", - "id\">$course->shortname -> - id\">$participants -> $fullname", + "id\">$course->shortname -> + id\">$participants -> $fullname", "", "", true, " ", $loggedinas); } else { print_header("$course->fullname: $personalprofile: $fullname", "$course->fullname", @@ -54,42 +54,42 @@ print_heading(get_string("userdeleted")); } - echo "
"; - echo ""; - echo "
body\" VALIGN=top>"; + echo ""; + echo ""; + echo "
"; print_user_picture($user->id, $course->id, $user->picture, true, false, false); - echo ""; + echo "cellcontent\" class=\"userinfoboxcontent\">"; // Print name and edit button across top - echo "
"; - echo "

$fullname

"; - echo "
"; + echo "
"; + echo "

$fullname

"; + echo "
"; if (empty($USER->id)) { $currentuser = false; } else { $currentuser = ($user->id == $USER->id); } if (($currentuser and !isguest()) or isadmin()) { - echo "

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

"; + echo "

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

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

".text_to_html($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"]); @@ -112,11 +112,11 @@ } if ($user->url) { - print_row(get_string("webpage").":", "url\">$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>"); + print_row("icq:","icq\">$user->icq icq&img=5\" width=18 height=18 border=0>"); } if ($user->lastaccess) { @@ -126,9 +126,9 @@ } print_row(get_string("lastaccess").":", $datestring); - echo "
"; + echo "
"; - echo "
"; + echo ""; $internalpassword = false; if (is_internal_auth()) { @@ -136,43 +136,43 @@ } // Print other functions - echo "
"; + echo "
"; if ($currentuser and !isguest()) { if ($internalpassword) { - echo ""; + echo ""; } else if (strlen($CFG->changepassword) > 1) { - echo ""; + echo ""; } } if ($course->category and ((isstudent($course->id) and ($user->id == $USER->id) and !isguest() and $CFG->allowunenroll) or (isteacher($course->id) and isstudent($course->id, $user->id))) ) { - echo ""; + echo ""; } if (isteacher($course->id)) { - echo ""; + echo ""; if ($user->id != $USER->id) { - echo ""; + echo ""; } } - echo "

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

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

changepassword\" METHOD=GET>"; - echo ""; - echo "

changepassword\" method=get>"; + echo ""; + echo "

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

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

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

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

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

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

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

$left

$right

"; + echo "

$left

$right

"; } ?> -- 2.39.5