]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes to make user profile pages validate Strrrict
authormoodler <moodler>
Sat, 6 Jan 2007 14:07:00 +0000 (14:07 +0000)
committermoodler <moodler>
Sat, 6 Jan 2007 14:07:00 +0000 (14:07 +0000)
lang/en_utf8/moodle.php
lib/weblib.php
theme/standard/styles_layout.css
user/index.php
user/view.php

index 6d77db4d58e2fd038b9bb91fd3e79c114bed9b70..2fa79475eb158b9873fb1ebeaf1bdcbee6da3f4e 100644 (file)
@@ -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';
index e609d26b517e4d9b5f3dbf040aac796982c70367..a7fb9106a5434ac8aac528a900e237309bb051fe 100644 (file)
@@ -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 .'&amp;text='. s(urlencode($text).'&amp;forcelang='.$forcelang);
index 301ddafa1fdbcb6e8cf520de3b8189f9266dd4d3..de2158f45b9ef5e73c9b97233ca5e20cdbd5d5d3 100644 (file)
@@ -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;
index 5b4487f969f23ecb5e2118a8ee27e020b988b006..268a27896dd789660153c7fc94ec283eb5228f37 100644 (file)
         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);
         }
     }
 
         //]]>
         </script>
             ';
-        echo '<form action="action_redir.php" method="post" id="participantsform" onSubmit="return checksubmit(this);">';
+        echo '<form action="action_redir.php" method="post" id="participantsform" onsubmit="return checksubmit(this);">';
+        echo '<div>';
         echo '<input type="hidden" name="returnto" value="'.$_SERVER['REQUEST_URI'].'" />';
         echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
     }
     }
 
     if ($bulkoperations) {
-        echo '<br /><div class="form-buttons" align="center">';
+        echo '<br /><div class="buttons">';
         echo '<input type="button" onclick="checkall()" value="'.get_string('selectall').'" /> ';
         echo '<input type="button" onclick="checknone()" value="'.get_string('deselectall').'" /> ';
         $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 '<input type="hidden" name="id" value="'.$course->id.'" />';
         echo '<input type="submit" value="' . get_string('ok') . '" />';
-        echo '</div></form>';
+        echo '</div>';
+        echo '</div>';
+        echo '</form>';
     }
 
     if ($bulkoperations && $totalcount > ($perpage*3)) {
-        echo '<form action="index.php"><p align="center"><input type="hidden" name="id" value="'.$course->id.'" />'.get_string('search').':&nbsp;'."\n";
-        echo '<input type="text" name="search" value="'.$search.'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></p></form>'."\n";
+        echo '<form action="index.php"><fieldset class="invisiblefieldset"><input type="hidden" name="id" value="'.$course->id.'" />'.get_string('search').':&nbsp;'."\n";
+        echo '<input type="text" name="search" value="'.$search.'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></fieldset></form>'."\n";
     }
 
     if ($perpage == SHOW_ALL_PAGE_SIZE) {
index a80f4988b66cfc8be3334a4642fc59bc64933abb..0d653f514cf0e99a29cc4e5d9b9ef3253c53136e 100644 (file)
         echo "Remote Moodle: <a href=\"{$remotehost->wwwroot}/user/edit.php\">{$remotehost->name}</a> (click here to edit your profile on the remote server) </p>\n";
     }
 
-    echo "<table width=\"80%\" align=\"center\" border=\"0\" cellspacing=\"0\" class=\"userinfobox\">";
-    echo "<tr>";
-    echo "<td width=\"100\" valign=\"top\" class=\"side\">";
+    echo '<table width="80%" class="userinfobox" summary="">';
+    echo '<tr>';
+    echo '<td class="side">';
     print_user_picture($user->id, $course->id, $user->picture, true, false, false);
-    echo "</td><td width=\"100%\" class=\"content\">";
+    echo '</td><td class="content">';
 
     // Print the description
 
 
     // Print all the little details in a list
 
-    echo '<table border="0" cellpadding="0" cellspacing="0" class="list">';
+    echo '<table class="list">';
 
     if (($user->city or $user->country) and (!isset($hiddenfields['city']) or !isset($hiddenfields['country']))) {
         $location = '';
             }
             $emailswitch = "&nbsp;<a title=\"$switchclick\" ".
                            "href=\"view.php?id=$user->id&amp;course=$course->id&amp;$switchparam=1\">".
-                           "<img border=\"0\" width=\"11\" height=\"11\" src=\"$CFG->pixpath/t/$switchpix\" alt=\"$switchclick\" /></a>";
+                           "<img src=\"$CFG->pixpath/t/$switchpix\" alt=\"$switchclick\" /></a>";
 
         } else if ($currentuser) {         /// Can only re-enable an email this way
             if ($user->emailstop) {   // Include link that tells how to re-enable their email
     }
 
     if ($user->icq && !isset($hiddenfields['icqnumber'])) {
-        print_row(get_string('icqnumber').':',"<a href=\"http://web.icq.com/wwp?uin=$user->icq\">$user->icq <img src=\"http://web.icq.com/whitepages/online?icq=$user->icq&amp;img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"\" /></a>");
+        print_row(get_string('icqnumber').':',"<a href=\"http://web.icq.com/wwp?uin=$user->icq\">$user->icq <img src=\"http://web.icq.com/whitepages/online?icq=$user->icq&amp;img=5\" alt=\"\" /></a>");
     }
 
     if ($user->skype && !isset($hiddenfields['skypeid'])) {
         print_row(get_string('skypeid').':','<a href="callto:'.urlencode($user->skype).'">'.s($user->skype). 
             ' <img src="http://mystatus.skype.com/smallicon/'.urlencode($user->skype).'" alt="'.get_string('status').'" '.
-            ' height="16" width="16" /></a>');
+            ' /></a>');
     }
     if ($user->yahoo && !isset($hiddenfields['yahooid'])) {
-        print_row(get_string('yahooid').':', '<a href="http://edit.yahoo.com/config/send_webmesg?.target='.urlencode($user->yahoo).'&amp;.src=pg">'.s($user->yahoo)." <img border=0 src=\"http://opi.yahoo.com/online?u=".urlencode($user->yahoo)."&m=g&t=0\" width=\"12\" height=\"12\" alt=\"\"></a>");
+        print_row(get_string('yahooid').':', '<a href="http://edit.yahoo.com/config/send_webmesg?.target='.urlencode($user->yahoo).'&amp;.src=pg">'.s($user->yahoo)." <img src=\"http://opi.yahoo.com/online?u=".urlencode($user->yahoo)."&m=g&t=0\" alt=\"\"></a>");
     }
     if ($user->aim && !isset($hiddenfields['aimid'])) {
         print_row(get_string('aimid').':', '<a href="aim:goim?screenname='.s($user->aim).'">'.s($user->aim).'</a>');
     }
 
 //  Print other functions
-    echo '<div class="buttons"><table align="center"><tr>';
+    echo '<div class="buttons">';
 
     if ($currentuser and !isguest()) {
         if ($internalpassword ) {
-            echo "<td nowrap=\"nowrap\"><form action=\"$internalpassword\" method=\"get\">";
+            echo "<form action=\"$internalpassword\" method=\"get\">";
             echo "<fieldset class='invisiblefieldset'>";
             echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
             if (!empty($USER->realuser)) {
                 echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
             }
             echo "</fieldset>";
-            echo "</form></td>";
+            echo "</form>";
         } elseif ( method_exists($userauth, 'change_password_url') and strlen($userauth->change_password_url())) {
-            echo "<td nowrap=\"nowrap\"><form action=\"".$userauth->change_password_url()."\" method=\"get\">";
+            echo "<form action=\"".$userauth->change_password_url()."\" method=\"get\">";
             echo "<fieldset class='invisiblefieldset'>";
             echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
             echo "</fieldset>";
-            echo "</form></td>";
+            echo "</form>";
         }
     }
 
             (has_capability('moodle/role:assign', $coursecontext, NULL) &&           // I can assign roles
              get_user_roles($coursecontext, $user->id)) ) {                          // This user has roles
 
-            echo '<td nowrap="nowrap"><form action="../course/unenrol.php" method="get">';
+            echo '<form action="../course/unenrol.php" method="get">';
             echo "<fieldset class='invisiblefieldset'>";
             echo '<input type="hidden" name="id" value="'.$course->id.'" />';
             echo '<input type="hidden" name="user" value="'.$user->id.'" />';
             echo '<input type="submit" value="'.get_string('unenrolme', '', $course->shortname).'" />';
             echo "</fieldset>";
-            echo '</form></td>';
+            echo '</form>';
         }
     }
 
     if ($USER->id != $user->id  && has_capability('moodle/user:loginas', $coursecontext))  {
-        echo '<td nowrap="nowrap"><form action="'.$CFG->wwwroot.'/course/loginas.php" method="get">';
+        echo '<form action="'.$CFG->wwwroot.'/course/loginas.php" method="get">';
         echo "<fieldset class='invisiblefieldset'>";
         echo '<input type="hidden" name="id" value="'.$course->id.'" />';
         echo '<input type="hidden" name="user" value="'.$user->id.'" />';
         echo '<input type="submit" value="'.get_string('loginas').'" />';
         echo "</fieldset>";
-        echo '</form></td>';
+        echo '</form>';
     }
 
     if (!empty($CFG->messaging) and !isguest()) {
             } else {
                 $messagebuttonname = get_string("messages", "message");
             }
-            echo "<td nowrap=\"nowrap\"><form target=\"message\" action=\"../message/index.php\" method=\"get\">";
+            echo "<form onclick=\"this.target='message'\" action=\"../message/index.php\" method=\"get\">";
             echo "<fieldset class='invisiblefieldset'>";
             echo "<input type=\"submit\" value=\"$messagebuttonname\" onclick=\"return openpopup('/message/index.php', 'message', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\" />";
             echo "</fieldset>";
-            echo "</form></td>";
+            echo "</form>";
         } else {
-            echo "<td nowrap=\"nowrap\"><form target=\"message_$user->id\" action=\"../message/discussion.php\" method=\"get\">";
+            echo "<form onclick=\"this.target='message$user->id'\" action=\"../message/discussion.php\" method=\"get\">";
             echo "<fieldset class='invisiblefieldset'>";
             echo "<input type=\"hidden\" name=\"id\" value=\"$user->id\" />";
             echo "<input type=\"submit\" value=\"".get_string("sendmessage", "message")."\" onclick=\"return openpopup('/message/discussion.php?id=$user->id', 'message_$user->id', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\" />";
             echo "</fieldset>";
-            echo "</form></td>";
+            echo "</form>";
         }
     }
     // Authorize.net: User Payments
     if ($course->enrol == 'authorize' || (empty($course->enrol) && $CFG->enrol == 'authorize')) {
-        echo "<td nowrap=\"nowrap\"><form action=\"../enrol/authorize/index.php\" method=\"get\">";
+        echo "<form action=\"../enrol/authorize/index.php\" method=\"get\">";
         echo "<fieldset class='invisiblefieldset'>";
         echo "<input type=\"hidden\" name=\"course\" value=\"$course->id\" />";
         echo "<input type=\"hidden\" name=\"user\" value=\"$user->id\" />";
         echo "<input type=\"submit\" value=\"".get_string('payments')."\" />";
         echo "</fieldset>";
-        echo "</form></td>";
+        echo "</form>";
     }
-    echo "<td></td>";
-    echo "</tr></table></div>\n";
+    echo "</div>\n";
 
 /*
     if (debugging() && $USER->id == $user->id) {   // TEMPORARY in DEV!
 /// Functions ///////
 
 function print_row($left, $right) {
-    echo "\n<tr><td nowrap=\"nowrap\" align=\"right\" valign=\"top\" class=\"label c0\">$left</td><td align=\"left\" valign=\"top\" class=\"info c1\">$right</td></tr>\n";
+    echo "\n<tr><td class=\"label c0\">$left</td><td class=\"info c1\">$right</td></tr>\n";
 }
 
 ?>