From c11387978c72727b8773639a73f57861710e284d Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 6 Jan 2007 14:07:00 +0000 Subject: [PATCH] Fixes to make user profile pages validate Strrrict --- lang/en_utf8/moodle.php | 1 + lib/weblib.php | 8 ++--- theme/standard/styles_layout.css | 11 ++++++- user/index.php | 19 +++++++----- user/view.php | 53 ++++++++++++++++---------------- 5 files changed, 52 insertions(+), 40 deletions(-) diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 6d77db4d58..2fa79475eb 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -950,6 +950,7 @@ line at the top of your web browser window. Cheers from the \'$a->sitename\' administrator, $a->signoff'; $string['newusers'] = 'New users'; +$string['newwindow'] = 'new window'; $string['next'] = 'Next'; $string['nextsection'] = 'Next section'; $string['no'] = 'No'; diff --git a/lib/weblib.php b/lib/weblib.php index e609d26b51..a7fb9106a5 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3111,9 +3111,9 @@ function print_user_picture($userid, $courseid, $picture, $size=0, $return=false $class = "userpicture"; if ($picture) { // Print custom user picture if ($CFG->slasharguments) { // Use this method if possible for better caching - $src = $CFG->wwwroot .'/user/pix.php/'. $userid .'/'. $file .'.jpg"'; + $src = $CFG->wwwroot .'/user/pix.php/'. $userid .'/'. $file .'.jpg'; } else { - $src = $CFG->wwwroot .'/user/pix.php?file=/'. $userid .'/'. $file .'.jpg"'; + $src = $CFG->wwwroot .'/user/pix.php?file=/'. $userid .'/'. $file .'.jpg'; } } else { // Print default user pictures (use theme version if available) $class .= " defaultuserpic"; @@ -4718,8 +4718,6 @@ function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext= $module = 'moodle'; } - // Accessibility: prefix the alt text/title with 'Help with', strip distracting dots '...' - // PLEASE DO NOT CHANGE. ('...' is VERY distracting for non-visual users) $tooltip = get_string('helpprefix2', '', trim($title, ". \t")); $linkobject = ''; @@ -4740,6 +4738,8 @@ function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext= $linkobject .= $tooltip; } + $tooltip .= ' ('.get_string('newwindow').')'; // Warn users about new window for Accessibility + // fix for MDL-7734 if ($text) { $url = '/help.php?module='. $module .'&text='. s(urlencode($text).'&forcelang='.$forcelang); diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 301ddafa1f..de2158f45b 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -1838,7 +1838,8 @@ body#message-messages { border-collapse: separate; } -.userinfobox .left { +.userinfobox .left, +.userinfobox .side { padding: 10px; width: 100px; vertical-align: top; @@ -1889,6 +1890,14 @@ body#user-index h2 { text-align: center; } +#user-view .buttons { + text-align: center; +} + +#user-view .buttons .form { + display: inline; +} + body#user-index #longtimenosee, body#user-index #showall { text-align: center; diff --git a/user/index.php b/user/index.php index 5b4487f969..268a27896d 100644 --- a/user/index.php +++ b/user/index.php @@ -423,9 +423,9 @@ print_heading($heading, 'center', 3); } else { if ($matchcount < $totalcount) { - print_heading(get_string('allparticipants').': '.$matchcount.'/'.$totalcount, 'center', 3); + print_heading(get_string('allparticipants').': '.$matchcount.'/'.$totalcount, '', 3); } else { - print_heading(get_string('allparticipants').': '.$matchcount, 'center', 3); + print_heading(get_string('allparticipants').': '.$matchcount, '', 3); } } @@ -458,7 +458,8 @@ //]]> '; - echo '
'; + echo ''; + echo '
'; echo ''; echo ''; } @@ -598,23 +599,25 @@ } if ($bulkoperations) { - echo '
'; + echo '
'; echo ' '; echo ' '; $displaylist['messageselect.php'] = get_string('messageselectadd'); if ($course->enrolperiod) { $displaylist['extendenrol.php'] = get_string('extendenrol'); } - choose_from_menu ($displaylist, "formaction", "", get_string("withselectedusers"), "if(checksubmit(this.form))this.form.submit();", ""); helpbutton("participantswithselectedusers", get_string("withselectedusers")); + choose_from_menu ($displaylist, "formaction", "", get_string("withselectedusers"), "if(checksubmit(this.form))this.form.submit();", ""); echo ''; echo ''; - echo '
'; + echo '
'; + echo '
'; + echo ''; } if ($bulkoperations && $totalcount > ($perpage*3)) { - echo '

'.get_string('search').': '."\n"; - echo ' 

'."\n"; + echo '
'.get_string('search').': '."\n"; + echo ' 
'."\n"; } if ($perpage == SHOW_ALL_PAGE_SIZE) { diff --git a/user/view.php b/user/view.php index a80f4988b6..0d653f514c 100644 --- a/user/view.php +++ b/user/view.php @@ -177,11 +177,11 @@ echo "Remote Moodle: wwwroot}/user/edit.php\">{$remotehost->name} (click here to edit your profile on the remote server)

\n"; } - echo ""; - echo ""; - echo "
"; + echo ''; + echo ''; + echo '\n"; + echo "\n\n"; } ?> -- 2.39.5
'; print_user_picture($user->id, $course->id, $user->picture, true, false, false); - echo ""; + echo ''; // Print the description @@ -191,7 +191,7 @@ // Print all the little details in a list - echo ''; + echo '
'; if (($user->city or $user->country) and (!isset($hiddenfields['city']) or !isset($hiddenfields['country']))) { $location = ''; @@ -251,7 +251,7 @@ } $emailswitch = " id&course=$course->id&$switchparam=1\">". - "pixpath/t/$switchpix\" alt=\"$switchclick\" />"; + "pixpath/t/$switchpix\" alt=\"$switchclick\" />"; } else if ($currentuser) { /// Can only re-enable an email this way if ($user->emailstop) { // Include link that tells how to re-enable their email @@ -272,16 +272,16 @@ } if ($user->icq && !isset($hiddenfields['icqnumber'])) { - print_row(get_string('icqnumber').':',"icq\">$user->icq icq&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"\" />"); + print_row(get_string('icqnumber').':',"icq\">$user->icq icq&img=5\" alt=\"\" />"); } if ($user->skype && !isset($hiddenfields['skypeid'])) { print_row(get_string('skypeid').':',''.s($user->skype). ' '.get_string('status').''); + ' />'); } if ($user->yahoo && !isset($hiddenfields['yahooid'])) { - print_row(get_string('yahooid').':', ''.s($user->yahoo)." yahoo)."&m=g&t=0\" width=\"12\" height=\"12\" alt=\"\">"); + print_row(get_string('yahooid').':', ''.s($user->yahoo)." yahoo)."&m=g&t=0\" alt=\"\">"); } if ($user->aim && !isset($hiddenfields['aimid'])) { print_row(get_string('aimid').':', ''.s($user->aim).''); @@ -348,11 +348,11 @@ } // Print other functions - echo '
'; + echo '
'; if ($currentuser and !isguest()) { if ($internalpassword ) { - echo "
"; + echo ""; } elseif ( method_exists($userauth, 'change_password_url') and strlen($userauth->change_password_url())) { - echo ""; + echo ""; } } @@ -381,24 +381,24 @@ (has_capability('moodle/role:assign', $coursecontext, NULL) && // I can assign roles get_user_roles($coursecontext, $user->id)) ) { // This user has roles - echo ''; + echo ''; } } if ($USER->id != $user->id && has_capability('moodle/user:loginas', $coursecontext)) { - echo ''; + echo ''; } if (!empty($CFG->messaging) and !isguest()) { @@ -408,32 +408,31 @@ } else { $messagebuttonname = get_string("messages", "message"); } - echo ""; + echo ""; } else { - echo ""; + echo ""; } } // Authorize.net: User Payments if ($course->enrol == 'authorize' || (empty($course->enrol) && $CFG->enrol == 'authorize')) { - echo ""; + echo ""; } - echo ""; - echo "
"; + echo ""; echo "
"; echo "id\" />"; if (!empty($USER->realuser)) { @@ -362,13 +362,13 @@ echo ""; } echo "
"; - echo "
change_password_url()."\" method=\"get\">"; + echo "change_password_url()."\" method=\"get\">"; echo "
"; echo ""; echo "
"; - echo "
'; + echo ''; echo "
"; echo ''; echo ''; echo ''; echo "
"; - echo '
'; + echo ''; echo "
"; echo ''; echo ''; echo ''; echo "
"; - echo '
"; + echo ""; echo "
"; echo ""; echo "
"; - echo "
id\" action=\"../message/discussion.php\" method=\"get\">"; + echo "id'\" action=\"../message/discussion.php\" method=\"get\">"; echo "
"; echo "id\" />"; echo "id', 'message_$user->id', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\" />"; echo "
"; - echo "
"; + echo ""; echo "
"; echo "id\" />"; echo "id\" />"; echo ""; echo "
"; - echo "
\n"; + echo "\n"; /* if (debugging() && $USER->id == $user->id) { // TEMPORARY in DEV! @@ -448,7 +447,7 @@ /// Functions /////// function print_row($left, $right) { - echo "\n
$left$right
$left$right