]> git.mjollnir.org Git - moodle.git/commitdiff
Changes for XHTML and accessibility compliance
authormoodler <moodler>
Tue, 19 Oct 2004 09:19:48 +0000 (09:19 +0000)
committermoodler <moodler>
Tue, 19 Oct 2004 09:19:48 +0000 (09:19 +0000)
mod/assignment/lib.php
mod/assignment/mod.html
mod/assignment/submissions.php
mod/assignment/view.php

index f7011a525e1459224e523c4f39c6b05e17046268..2a45366233700212be5b2dc9d65e2aa759ad9f77 100644 (file)
@@ -544,27 +544,28 @@ function assignment_print_difference($time) {
 function assignment_print_submission($assignment, $user, $submission, $teachers, $grades) {
     global $THEME, $USER;
 
-    echo "\n<table BORDER=1 CELLSPACING=0 valign=top cellpadding=10 align=center>";
+    echo "\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"10\" align=\"center\">";
 
     echo "\n<tr>";
     if ($assignment->type == OFFLINE) {
-        echo "\n<td BGCOLOR=\"$THEME->body\" WIDTH=35 VALIGN=TOP>";
+        echo "\n<td bgcolor=\"$THEME->body\" width=\"35\" valign=\"top\">";
     } else {
-        echo "\n<td ROWSPAN=2 BGCOLOR=\"$THEME->body\" WIDTH=35 VALIGN=TOP>";
+        echo "\n<td rowspan=\"2\" bgcolor=\"$THEME->body\" width=\"35\" valign\"top\">";
     }
     print_user_picture($user->id, $assignment->course, $user->picture);
     echo "</td>";
-    echo "<td NOWRAP BGCOLOR=\"$THEME->cellheading\">".fullname($user, true);
+    echo "<td nowrap=\"nowrap\" bgcolor=\"$THEME->cellheading\">".fullname($user, true);
     if ($assignment->type != OFFLINE and $submission->timemodified) {
         echo "&nbsp;&nbsp;<font SIZE=1>".get_string("lastmodified").": ";
         echo userdate($submission->timemodified);
         echo assignment_print_difference($assignment->timedue - $submission->timemodified);
         echo "</font>";
     }
+    echo "</td>\n";
     echo "</tr>";
 
     if ($assignment->type != OFFLINE) {
-        echo "\n<tr><td BGCOLOR=\"$THEME->cellcontent\">";
+        echo "\n<tr><td bgcolor=\"$THEME->cellcontent\">";
         if ($submission->timemodified) {
             assignment_print_user_files($assignment, $user);
         } else {
@@ -574,11 +575,12 @@ function assignment_print_submission($assignment, $user, $submission, $teachers,
     }
 
     echo "\n<tr>";
-    echo "<td width=35 valign=TOP>";
+    echo "<td width=\"35\" valign=\"top\">";
     if (!$submission->teacher) {
         $submission->teacher = $USER->id;
     }
     print_user_picture($submission->teacher, $assignment->course, $teachers[$submission->teacher]->picture);
+    echo "</td>\n";
     if ($submission->timemodified > $submission->timemarked) {
         echo "<td bgcolor=\"$THEME->cellheading2\">";
     } else {
@@ -592,7 +594,7 @@ function assignment_print_submission($assignment, $user, $submission, $teachers,
     if ($submission->timemarked) {
         echo "&nbsp;&nbsp;<font size=1>".userdate($submission->timemarked)."</font>";
     }
-    echo "<br /><textarea name=\"c$submission->id\" rows=6 cols=60 wrap=virtual>";
+    echo "<br /><textarea name=\"c$submission->id\" rows=\"6\" cols=\"60\">";
     p($submission->comment);
     echo "</textarea><br />";
     echo "</td></tr>";
@@ -607,20 +609,20 @@ function assignment_print_feedback($course, $submission, $assignment) {
         error("Weird assignment error");
     }
 
-    echo "\n<table border=0 cellpadding=1 cellspacing=1 align=CENTER><tr><td bgcolor=#888888>";
-    echo "\n<table border=0 cellpadding=3 cellspacing=0 valign=TOP>";
+    echo "\n<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\"><tr><td bgcolor=\"#888888\">";
+    echo "\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" valign=\"top\">";
 
     echo "\n<tr>";
-    echo "\n<td rowspan=3 bgcolor=\"$THEME->body\" width=35 valign=TOP>";
+    echo "\n<td rowspan=\"3\" bgcolor=\"$THEME->body\" width=\"35\" valign=\"top\">";
     print_user_picture($teacher->id, $course->id, $teacher->picture);
     echo "</td>";
-    echo "<td NOWRAP width=100% bgcolor=\"$THEME->cellheading\">".fullname($teacher);
-    echo "&nbsp;&nbsp;<font size=2><i>".userdate($submission->timemarked)."</i>";
+    echo "<td nowrap=\"nowrap\" width=\"100%\" bgcolor=\"$THEME->cellheading\">".fullname($teacher);
+    echo "&nbsp;&nbsp;<font size=\"2\"><i>".userdate($submission->timemarked)."</i>";
     echo "</tr>";
 
-    echo "\n<tr><td width=100% bgcolor=\"$THEME->cellcontent\">";
+    echo "\n<tr><td width=\"100%\" bgcolor=\"$THEME->cellcontent\">";
 
-    echo "<p align=RIGHT><font size=-1><i>";
+    echo "<p align=\"right\"><font size=\"-1\"><i>";
     if ($assignment->grade) {
         if ($submission->grade or $submission->timemarked) {
             echo get_string("grade").": $submission->grade";
index 27157086e44543d5a2ad6bed1948e9e4705e18f8..b4886b36cfb1d2aac9e2973e8ef0282153adbefe 100644 (file)
 <form name="form" method="post" action="mod.php">
 <table cellpadding="5">
 <tr valign="top">
-    <td align=right><p><b><?php print_string("assignmentname", "assignment") ?>:</b></p></td>
+    <td align="right"><b><?php print_string("assignmentname", "assignment") ?>:</b></td>
     <td>
-        <input type="text" name="name" size=60 value="<?php p($form->name) ?>" />
+        <input type="text" name="name" size="60" value="<?php p($form->name) ?>" alt="<?php print_string("assignmentname", "assignment") ?>" />
     </td>
 </tr>
 <tr valign="top">
-    <td align=right><p><b><?php print_string("description", "assignment") ?>:</b></p>
+    <td align="right"><b><?php print_string("description", "assignment") ?>:</b><br />
     <font size="1">
      <?php
         helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
@@ -71,7 +71,7 @@
     </td>
 </tr>
 <tr valign="top">
-    <td align=right><p><b><?php print_string("assignmenttype", "assignment") ?>:</b></p></td>
+    <td align="right"><b><?php print_string("assignmenttype", "assignment") ?>:</b></td>
     <td>
     <?php
        require_once("$CFG->dirroot/mod/assignment/lib.php");
@@ -82,7 +82,7 @@
     </td>
 </tr>
 <tr>
-    <td align=right><p><b><?php print_string("allowresubmit", "assignment") ?>:</b></p></td>
+    <td align="right"><b><?php print_string("allowresubmit", "assignment") ?>:</b></td>
     <td>
     <?php 
         $options[0] = get_string("no"); $options[1] = get_string("yes");
     ?>
     </td>
 </tr>
-<tr valign=top>
-    <td align=right><p><b><?php print_string("grade") ?>:</b></p></td>
+<tr valign="top">
+    <td align="right"><b><?php print_string("grade") ?>:</b></td>
     <td>
         <?php
         print_grade_menu($course->id, "grade", "$form->grade");
         ?>
     </td>
 </tr>
-<tr valign=top>
-    <td align=right><p><b><?php print_string("maximumsize", "assignment") ?>:</b></p></td>
+<tr valign="top">
+    <td align="right"><b><?php print_string("maximumsize", "assignment") ?>:</b></td>
        <td><?php
     $choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
     choose_from_menu ($choices, "maxbytes", $form->maxbytes, "");
     ?>
        </td>
 </tr>
-<tr valign=top>
-    <td align=right><p><b><?php print_string("duedate", "assignment") ?>:</b></td>
+<tr valign="top">
+    <td align="right"><b><?php print_string("duedate", "assignment") ?>:</b></td>
     <td><?php
            print_date_selector("dueday", "duemonth", "dueyear", $form->timedue);
            echo "&nbsp;-&nbsp;";
 </table>
 <br />
 <center>
-<input type="hidden" name=course     value="<?php p($form->course) ?>" />
-<input type="hidden" name=coursemodule  value="<?php p($form->coursemodule) ?>" />
-<input type="hidden" name=section       value="<?php p($form->section) ?>" />
-<input type="hidden" name=module     value="<?php p($form->module) ?>" />
-<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
-<input type="hidden" name=instance   value="<?php p($form->instance) ?>" />
-<input type="hidden" name=mode       value="<?php p($form->mode) ?>" />
-<input type="submit" value="<?php print_string("savechanges") ?>" />
-<input type="submit" name=cancel value="<?php print_string("cancel") ?>" />
+<input type="hidden" name="course"        value="<?php p($form->course) ?>" />
+<input type="hidden" name="coursemodule"  value="<?php p($form->coursemodule) ?>" />
+<input type="hidden" name="section"       value="<?php p($form->section) ?>" />
+<input type="hidden" name="module"        value="<?php p($form->module) ?>" />
+<input type="hidden" name="modulename"    value="<?php p($form->modulename) ?>" />
+<input type="hidden" name="instance"      value="<?php p($form->instance) ?>" />
+<input type="hidden" name="mode"          value="<?php p($form->mode) ?>" />
+<input type="submit"                      value="<?php print_string("savechanges") ?>" />
+<input type="submit" name="cancel"        value="<?php print_string("cancel") ?>" />
 </center>
 </form>
index 8a7251edabcafdf951be827ac8eb6d3cf26c89b9..b80603b1dc1259e190ca0680afaac4f1df1fddca 100644 (file)
     if ($allowedtograde) {
         echo '<form action="submissions.php" method="post">';
         echo "<center>";
-        echo "<input type=hidden name=sort value=\"$sort\" />";
-        echo "<input type=hidden name=timenow value=\"$timenow\" />";
-        echo "<input type=hidden name=id value=\"$assignment->id\" />";
-        echo "<input type=submit value=\"$strsaveallfeedback\" />";
+        echo "<input type=\"hidden\" name=\"sort\" value=\"$sort\" />";
+        echo "<input type=\"hidden\" name=\"timenow\" value=\"$timenow\" />";
+        echo "<input type=\"hidden\" name=\"id\" value=\"$assignment->id\" />";
+        echo "<input type=\"submit\" value=\"$strsaveallfeedback\" />";
         echo "</center>";
     }
     
 
     if ($allowedtograde) {
         echo "<center>";
-        echo "<input type=hidden name=sort value=\"$sort\" />";
-        echo "<input type=hidden name=timenow value=\"$timenow\" />";
-        echo "<input type=hidden name=id value=\"$assignment->id\" />";
-        echo "<input type=submit value=\"$strsaveallfeedback\" />";
+        echo "<input type=\"submit\" value=\"$strsaveallfeedback\" />";
         echo "</center>";
         echo "</form>";
     }
index b81625d7a8eb32c96d654586cbd9e25cec18248d..af0e4cfd8c530c2513d6ed0689d95c35ddc65e5d 100644 (file)
@@ -39,7 +39,7 @@
     $strassignment  = get_string("modulename", "assignment");
 
     print_header_simple($assignment->name, "",
-                 "<a href=index.php?id=$course->id>$strassignments</a> -> $assignment->name", 
+                 "<a href=\"index.php?id=$course->id\">$strassignments</a> -> $assignment->name", 
                   "", "", true, update_module_button($cm->id, $course->id, $strassignment), navmenu($course, $cm));
 
     if (isteacher($course->id)) {
@@ -64,8 +64,8 @@
         notice(get_string("activityiscurrentlyhidden"));
     }
 
-    print_simple_box_start("CENTER");
-    print_heading($assignment->name, "CENTER");
+    print_simple_box_start("center");
+    print_heading($assignment->name, "center");
 
     $timedifference = $assignment->timedue - time();
     if ($timedifference < 31536000) {      // Don't bother showing dates over a year in the future