]> git.mjollnir.org Git - moodle.git/commitdiff
Changes for XHTML and accessibility compliance
authormoodler <moodler>
Thu, 23 Sep 2004 11:01:22 +0000 (11:01 +0000)
committermoodler <moodler>
Thu, 23 Sep 2004 11:01:22 +0000 (11:01 +0000)
lib/uploadlib.php
user/edit.html
user/view.php

index 66e81e2755ed5f42474333e083b2dc1e21c525cd..0c773a897757c520e85ba5e3e4905da304dcb0da 100644 (file)
@@ -383,10 +383,11 @@ function upload_print_form_fragment($numfiles=1,$names=null,$descriptions=null,$
         if (is_array($descriptions) && !empty($descriptions[$i])) {
             $str .= '<b>'.$descriptions[$i].'</b><br />';
         }
-        $str .= '<input type="file" size="50" name="'.((is_array($names) && !empty($names[$i])) ? $names[$i] : 'FILE_'.$i).'" /><br />'."\n";
+        $name = ((is_array($names) && !empty($names[$i])) ? $names[$i] : 'FILE_'.$i);
+        $str .= '<input type="file" size="50" name="'.$name.'" alt="'.$name.'" /><br />'."\n";
         if ($uselabels) {
-            $str .= get_string('uploadlabel').' <input type="text" size="50" name="'
-                .((is_array($labelnames) && !empty($labelnames[$i])) ? $labelnames[$i] : 'LABEL_'.$i)
+            $lname = ((is_array($labelnames) && !empty($labelnames[$i])) ? $labelnames[$i] : 'LABEL_'.$i);
+            $str .= get_string('uploadlabel').' <input type="text" size="50" name="'.$lname.'" alt="'.$lname
                 .'" /><br /><br />'."\n";
         }
     }
@@ -673,4 +674,4 @@ function clam_change_log($oldpath,$newpath,$update=true) {
         }
     }
 }
-?>
\ No newline at end of file
+?>
index 5c88cbb9234ce66fa4735561faaf903bdd107f8f..3e7ab0eb3605b781910b31ac4a88c79bfad9a304 100644 (file)
@@ -20,7 +20,7 @@ if (isadmin()) {
     echo "<tr valign=\"top\">";
     echo "<td align=\"right\"> ".get_string("username").": </td>";
     if ($adminself || is_internal_auth($user->auth) ){
-        echo "<td> <input type=\"text\" name=\"username\" size=\"20\" value=\"";
+        echo "<td> <input type=\"text\" name=\"username\" size=\"20\" alt=\"".get_string("username")."\" value=\"";
         p($user->username);
         echo "\" />";
         if (isset($err["username"])) formerr($err["username"]);
@@ -46,7 +46,7 @@ if (isadmin()) {
     if ($adminself || is_internal_auth($user->auth) || (!empty($CFG->{'auth_'.$user->auth.'_stdchangepassword'}))) {
         echo "<tr valign=\"top\">";
         echo "<td align=\"right\"> ".get_string("newpassword").": </td>";
-        echo "<td> <input type=\"text\" name=\"newpassword\" size=\"20\" value=\"";
+        echo "<td> <input type=\"text\" name=\"newpassword\" size=\"20\" alt=\"".get_string("newpassword")."\" value=\"";
         if (isset($user->newpassword)) {
             p($user->newpassword);
         }
@@ -65,8 +65,8 @@ if (isadmin()) {
                  $checked = '';
              }
              echo "<tr>";
-             echo '<td align=right><p>'.get_string('forcepasswordchange').':</td>';
-             echo '<td><input type="checkbox" name="forcepasswordchange" '.$checked.' /> '.get_string('forcepasswordchangehelp').'</td>';            
+             echo '<td align="right">'.get_string('forcepasswordchange').':</td>';
+             echo '<td><input type="checkbox" name="forcepasswordchange" alt="'.get_string('forcepasswordchange').'" '.$checked.' /> '.get_string('forcepasswordchangehelp').'</td>';            
              echo "</tr>";
         }
                  
@@ -78,21 +78,21 @@ if (isadmin()) {
 <tr valign="top">
     <td align="right"><?php print_string("firstname") ?>:</td>
     <td>
-    <input type="text" name="firstname" size="30" maxlength="20" value="<?php p($user->firstname) ?>" />
+    <input type="text" name="firstname" size="30" alt="<?php print_string("firstname") ?>" maxlength="20" value="<?php p($user->firstname) ?>" />
     <?php if (isset($err["firstname"])) formerr($err["firstname"]); ?>
     </td>
 </tr>
 <tr valign="top">
     <td align="right"><?php print_string("lastname") ?>:</td>
     <td>
-    <input type="text" name="lastname" size="30" maxlength="20" value="<?php p($user->lastname) ?>" />
+    <input type="text" name="lastname" size="30" alt="<?php print_string("lastname") ?>" maxlength="20" value="<?php p($user->lastname) ?>" />
     <?php if (isset($err["lastname"])) formerr($err["lastname"]); ?>
     </td>
 </tr>
 <tr valign="top">
-    <td align="right"><p><?php print_string("email") ?>:</td>
+    <td align="right"><?php print_string("email") ?>:</td>
     <td>
-    <input type="text" name="email" size="30" maxlength="100" value="<?php p($user->email) ?>" />
+    <input type="text" name="email" size="30" alt="<?php print_string("email") ?>" maxlength="100" value="<?php p($user->email) ?>" />
     <?php if (isset($err["email"])) formerr($err["email"]); ?>
     </td>
 </tr>
@@ -155,9 +155,9 @@ if (isadmin()) {
 </tr>
 <?php } ?>
 <tr valign="top">
-    <td align="right"> <?php print_string("city") ?>:</td>
+    <td align="right"><?php print_string("city") ?>:</td>
     <td>
-    <input type="text" name="city" size="25" maxlength="20" value="<?php p($user->city) ?>" />
+    <input type="text" name="city" size="25" alt="<?php print_string("city") ?>" maxlength="20" value="<?php p($user->city) ?>" />
     <?php if (isset($err["city"])) formerr($err["city"]); ?>
     </td>
 </tr>
@@ -240,7 +240,7 @@ if (isadmin()) {
     <td> 
        <?php print_user_picture($user->id, $course->id, $user->picture, false, false, false);
              if ($user->picture) {
-                 echo '&nbsp;&nbsp;<input type="checkbox" name="deletepicture" value="1">';
+                 echo '&nbsp;&nbsp;<input type="checkbox" name="deletepicture" alt="'.get_string("delete").'" value="1" />';
                  print_string("delete");
              }
        ?>
@@ -273,54 +273,54 @@ if (isadmin()) {
 
 <tr valign="top">
     <td align="right"> <?php print_string("webpage") ?>: </td>
-    <td> <input type="text" name="url" size="50" maxlength="255" value="<?php p($user->url) ?>" />
+    <td> <input type="text" name="url" size="50" alt="<?php print_string("webpage") ?>" maxlength="255" value="<?php p($user->url) ?>" />
     <?php if (isset($err["url"])) formerr($err["url"]); ?>
      </td>
 </tr>
 <tr valign="top">
     <td align="right"> <?php print_string("icqnumber") ?>: </td>
-    <td> <input type="text" name="icq" size="25" maxlength="15" value="<?php p($user->icq) ?>" />
+    <td> <input type="text" name="icq" size="25" alt="<?php print_string("icqnumber") ?>" maxlength="15" value="<?php p($user->icq) ?>" />
     <?php if (isset($err["icq"])) formerr($err["icq"]); ?>
      </td>
 </tr>
 <tr valign="top">
     <td align="right"> <?php print_string("idnumber") ?>: </td>
     <td>
-    <input type="text" name="idnumber" size="25" maxlength="12" value="<?php p($user->idnumber) ?>" /> <?php p($teacheronly) ?>
+    <input type="text" name="idnumber" size="25" alt="<?php print_string("idnumber") ?>" maxlength="12" value="<?php p($user->idnumber) ?>" /> <?php p($teacheronly) ?>
     <?php if (isset($err["idnumber"])) formerr($err["idnumber"]); ?>
      </td>
 </tr>
 <?php if (isadmin()) {  ?>
 <tr valign="top">
     <td align="right"> <?php print_string("institution") ?>:</td>
-    <td><input type="text" name="institution" size="25" maxlength="40" value="<?php p($user->institution) ?>" /> <?php p($teacheronly) ?>
+    <td><input type="text" name="institution" size="25" alt="<?php print_string("institution") ?>" maxlength="40" value="<?php p($user->institution) ?>" /> <?php p($teacheronly) ?>
     </td>
 </tr>
 <tr valign="top">
     <td align="right"> <?php print_string("department") ?>: </td>
     <td>
-    <input type="text" name="department" size="25" maxlength="30" value="<?php p($user->department) ?>" /> <?php p($teacheronly) ?>
+    <input type="text" name="department" size="25" alt="<?php print_string("department") ?>" maxlength="30" value="<?php p($user->department) ?>" /> <?php p($teacheronly) ?>
     </td>
 </tr>
 <?php } ?>
 <tr valign="top">
     <td align="right"> <?php print_string("phone") ?> 1: </td>
     <td>
-    <input type="text" name="phone1" size="25" maxlength="20" value="<?php p($user->phone1) ?>" /> <?php p($teacheronly) ?>
+    <input type="text" name="phone1" size="25" alt="<?php print_string("phone") ?>" maxlength="20" value="<?php p($user->phone1) ?>" /> <?php p($teacheronly) ?>
     <?php if (isset($err["phone1"])) formerr($err["phone1"]); ?>
      </td>
 </tr>
 <tr valign="top">
     <td align="right"> <?php print_string("phone") ?> 2: </td>
     <td>
-    <input type="text" name="phone2" size="25" maxlength="20" value="<?php p($user->phone2) ?>" /> <?php p($teacheronly) ?>
+    <input type="text" name="phone2" size="25" alt="<?php print_string("phone") ?>" maxlength="20" value="<?php p($user->phone2) ?>" /> <?php p($teacheronly) ?>
     <?php if (isset($err["phone2"])) formerr($err["phone2"]); ?>
      </td>
 </tr>
 <tr valign="top">
     <td align="right"> <?php print_string("address") ?>: </td>
     <td>
-    <input type="text" name="address" size="25" maxlength="70" value="<?php p($user->address) ?>" /> <?php p($teacheronly) ?>
+    <input type="text" name="address" size="25" alt="<?php print_string("address") ?>" maxlength="70" value="<?php p($user->address) ?>" /> <?php p($teacheronly) ?>
     <?php if (isset($err["address"])) formerr($err["address"]); ?>
      </td>
 </tr>
index 8c249a25d942a91cae215cf641213732fb7bbb6c..d34bf3c7e6fc9c0a2cc9e3c0a9da30d97ce54523 100644 (file)
                 $switchclick = get_string('emaildisableclick');
                 $switchpix   = 'email.gif';
             }
-            $emailswitch = "&nbsp<a title=\"$switchclick\" ".
-                           "href=\"view.php?id=$user->id&amp;course=$course->id&$switchparam=$user->id\">".
+            $emailswitch = "&nbsp;<a title=\"$switchclick\" ".
+                           "href=\"view.php?id=$user->id&amp;course=$course->id&amp;$switchparam=$user->id\">".
                            "<img border=\"0\" width=\"11\" height=\"11\" src=\"$CFG->pixpath/t/$switchpix\" alt=\"\" /></a>";
         } else {
             $emailswitch = '';
     echo "<center><table align=\"center\"><tr>";
     if ($currentuser and !isguest()) {
         if ($internalpassword) {
-            echo "<td nowrap=\"nowrap\"><p><form action=\"$internalpassword\" method=\"get\">";
+            echo "<td nowrap=\"nowrap\"><form action=\"$internalpassword\" method=\"get\">";
             echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
             echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
-            echo "</form></p></td>";
+            echo "</form></td>";
         } else if (strlen($CFG->changepassword) > 1) {
-            echo "<td nowrap=\"nowrap\"><p><form action=\"$CFG->changepassword\" method=\"get\">";
+            echo "<td nowrap=\"nowrap\"><form action=\"$CFG->changepassword\" method=\"get\">";
             echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
-            echo "</form></p></td>";
+            echo "</form></td>";
         }
     }
     if ($course->category and
         ((isstudent($course->id) and ($user->id == $USER->id) and !isguest() and $CFG->allowunenroll) or
         (isteacheredit($course->id) and isstudent($course->id, $user->id))) ) {
-        echo "<td nowrap=\"nowrap\"><p><form action=\"../course/unenrol.php\" method=\"get\" />";
+        echo "<td nowrap=\"nowrap\"><form action=\"../course/unenrol.php\" method=\"get\" />";
         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 "</form></p></td>";
+        echo "</form></td>";
     }
     if (isteacher($course->id) or ($course->showreports and $USER->id == $user->id)) {
-        echo "<td nowrap=\"nowrap\"><p><form action=\"../course/user.php\" method=\"get\">";
+        echo "<td nowrap=\"nowrap\"><form action=\"../course/user.php\" method=\"get\">";
         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("activityreport")."\" />";
-        echo "</form></p></td>";
+        echo "</form></td>";
     }
     if ((isadmin() and !isadmin($user->id)) or (isteacher($course->id) and ($USER->id != $user->id) and !iscreator($user->id))) {
-        echo "<td nowrap=\"nowrap\"><p><form action=\"../course/loginas.php\" method=\"get\">";
+        echo "<td nowrap=\"nowrap\"><form action=\"../course/loginas.php\" method=\"get\">";
         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 "</form></p></td>";
+        echo "</form></td>";
     }
     echo "<td></td>";
     echo "</tr></table></center>\n";