From ed3136ff1e11e1aa3c6e1b374415f59408d15374 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 16 Feb 2005 10:34:02 +0000 Subject: [PATCH] Adding styles to the user information --- lib/weblib.php | 58 +++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 99053e60c12..812af323e2f 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2080,13 +2080,14 @@ function print_simple_box_end() { * @todo Finish documenting this function */ function print_single_button($link, $options, $label='OK', $method='get', $target='_self') { + echo ''; echo '
'; if ($options) { foreach ($options as $name => $value) { echo ''; } } - echo '
'; + echo '
'; } /** @@ -2099,7 +2100,7 @@ function print_single_button($link, $options, $label='OK', $method='get', $targe */ function print_spacer($height=1, $width=1, $br=true) { global $CFG; - echo ''; + echo ''; if ($br) { echo '
'."\n"; } @@ -2183,10 +2184,10 @@ function print_user_picture($userid, $courseid, $picture, $size=0, $returnstring } if ($picture) { // Print custom user picture if ($CFG->slasharguments) { // Use this method if possible for better caching - $output .= 'wwwroot .'/user/pix.php/'. $userid .'/'. $file .'.jpg"'. ' border="0" width="'. $size .'" height="'. $size .'" alt="" />'; } else { - $output .= 'wwwroot .'/user/pix.php?file=/'. $userid .'/'. $file .'.jpg"'. ' border="0" width="'. $size .'" height="'. $size .'" alt="" />'; } } else { // Print default user pictures (use theme version if available) @@ -2250,15 +2251,14 @@ function print_user($user, $course) { $isadmin = isadmin(); } - echo ''; + echo '
'; echo ''; - echo ''; - echo '
'; + echo ''; print_user_picture($user->id, $course->id, $user->picture, true); echo ''; - echo ''; - echo ''.fullname($user, $isteacher).''; - echo '

'; + echo '

'; + echo '
'.fullname($user, $isteacher).'
'; + echo '
'; if (!empty($user->role) and ($user->role <> $course->teacher)) { echo $string->role .': '. $user->role .'
'; } @@ -2284,9 +2284,8 @@ function print_user($user, $course) { } else { echo $string->lastaccess .': '. $string->never; } - echo '
'; + echo '
'; } @@ -2343,11 +2341,11 @@ function print_group_picture($group, $courseid, $large=false, $returnstring=fals } if ($group->picture) { // Print custom group picture if ($CFG->slasharguments) { // Use this method if possible for better caching - $output .= "wwwroot/user/pixgroup.php/$group->id/$file.jpg\"". - " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\" title=\"$group->name\"/>"; + $output .= ''; } else { - $output .= "wwwroot/user/pixgroup.php?file=/$group->id/$file.jpg\"". - " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\" title=\"$group->name\"/>"; + $output .= ''; } } if ($link or $isteacheredit) { @@ -2633,8 +2631,8 @@ function make_table($table) { * @param boolean $usehtmleditor ? * @param int $rows ? * @param int $cols ? - * @param null $width Legacy field no longer used! - * @param null $height Legacy field no longer used! + * @param null $width Legacy field no longer used! Set to zero to get control over mincols + * @param null $height Legacy field no longer used! Set to zero to get control over minrows * @param string $name ? * @param string $value ? * @param int $courseid ? @@ -2661,11 +2659,15 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v echo ''."\n"; echo ''."\n"; - if ($rows < 10) { - $rows = 10; + if ($height) { // Usually with legacy calls + if ($rows < 10) { + $rows = 10; + } } - if ($cols < 65) { - $cols = 65; + if ($width) { // Usually with legacy calls + if ($cols < 65) { + $cols = 65; + } } } @@ -2696,9 +2698,9 @@ function print_richedit_javascript($form, $name, $source='no') { * * @param string $name Form element to replace with HTMl editor by name */ -function use_html_editor($name='') { +function use_html_editor($name='', $editorhidebuttons='') { echo '