]> git.mjollnir.org Git - moodle.git/commitdiff
Changes for XHTML and accessibility compatibility
authormoodler <moodler>
Fri, 26 Nov 2004 07:07:06 +0000 (07:07 +0000)
committermoodler <moodler>
Fri, 26 Nov 2004 07:07:06 +0000 (07:07 +0000)
mod/scorm/details.php
mod/scorm/mod.html
mod/survey/details.php
mod/survey/lib.php
mod/survey/mod.html
mod/survey/report.php

index a9a5ee73aa7b282f0a4cd291d4d5648c7b73998b..f02dcee7078440a58d33fec050c00c3fe59cad91 100755 (executable)
     //
     print_simple_box_start("center", "", "$THEME->cellheading");
     echo "<table cellpadding=\"5\" align=\"center\">\n";
-    echo "    <tr><td align=\"right\" nowrap=\"nowrap\"><p><b>$strname:</b></p></td><td><p>$form->name</p></td></tr>\n";
-    echo "    <tr><td align=\"right\" nowrap=\"nowrap\"><p><b>".get_string("validation","scorm").":</b></p></td><td><p>".get_string($result,"scorm")."</p></td></tr>\n";
+    echo "    <tr><td align=\"right\" nowrap=\"nowrap\"><b>$strname:</b></td><td>$form->name</td></tr>\n";
+    echo "    <tr><td align=\"right\" nowrap=\"nowrap\"><b>".get_string("validation","scorm").":</b></td><td>".get_string($result,"scorm")."</td></tr>\n";
     if ($errorlogs != '') {
         $lines = round(count($errors)/4);
         if ($lines < 5) {
             $lines = 5;
         }
-        echo "    <tr><td align=\"right\" nowrap=\"nowrap\"><p><b>".get_string("errorlogs","scorm").":</b></p></td><td><textarea rows=\"".$lines."\" cols=\"30\" readonly>".$errorlogs."</textarea></a></td></tr>\n";
+        echo "    <tr><td align=\"right\" nowrap=\"nowrap\"><b>".get_string("errorlogs","scorm").":</b></td><td><textarea rows=\"".$lines."\" cols=\"30\" readonly>".$errorlogs."</textarea></a></td></tr>\n";
     }
     if (($form->mode == "update") && ($form->launch == 0) && (get_records("scorm_sco_users","scormid",$form->instance))) {
-        echo "    <tr><td align=\"center\" colspan=\"2\" nowrap=\"nowrap\"><p><b>".get_string("trackingloose","scorm")."</b></p></td></tr>\n";
+        echo "    <tr><td align=\"center\" colspan=\"2\" nowrap=\"nowrap\"><b>".get_string("trackingloose","scorm")."</b></td></tr>\n";
     }
     echo "</table>\n";
     if (($result == "regular") || ($result == "found")) {
 ?>
     <table cellpadding="5" align="center">
         <tr valign="top">
-            <td align="right"><p><b><?php print_string("grademethod", "scorm") ?>:</b></p></td>
+            <td align="right"><b><?php print_string("grademethod", "scorm") ?>:</b></td>
             <td>
             <?php
                 $options = array();
             </td>
         </tr>
         <tr valign="top">
-            <td align="right"><p><b><?php print_string("maximumgrade") ?>:</b></p></td>
+            <td align="right"><b><?php print_string("maximumgrade") ?>:</b></td>
             <td>
             <?php
                 for ($i=100; $i>=1; $i--) {
             </td>
         </tr>
         <tr valign="top">
-            <td align="right"><p><b><?php print_string("autocontinue","scorm") ?>:</b></p></td>
+            <td align="right"><b><?php print_string("autocontinue","scorm") ?>:</b></td>
             <td>
             <?php
                 $options = array();
         </tr>
         <tr valign="top">
             <td align="right" nowrap="nowrap">
-                <p><b><?php p($strnewwindow) ?></b></p>
+                <b><?php p($strnewwindow) ?>:</b>
             </td>
             <td>
                 <script type="text/javascript">
                 ?>
 
                 <input name="hwidth" type="hidden" value="0" />
-                <input name="width" type="text" size="4" value="<?php p($window->width) ?>" /> <?php p($strwidth) ?><br />
+                <input name="width" type="text" size="4" value="<?php p($window->width) ?>" alt="width" /> <?php p($strwidth) ?><br />
                 <input name="hheight" type="hidden" value="0" />
-                <input name="height" type="text" size="4" value="<?php p($window->height) ?>" /> <?php p($strheight) ?><br />
+                <input name="height" type="text" size="4" value="<?php p($window->height) ?>" alt="height" /> <?php p($strheight) ?><br />
                 <?php
                      if (!$newwindow) {
-                         echo "<script>\n<!--\n";
+                         echo "<script type=\"text/javascript\">\n<!--\n";
                          echo "\tlockoptions('theform','newwindow', subitems);";
                          echo "\n-->\n</script>";
                      }
index 0c3cd53496d3cd1d50281660a56ec1d7cc353535..c66a63d0bc561f73d0f207bf756b80baba845fb9 100755 (executable)
@@ -17,9 +17,9 @@
 <form name="form" method="post" action="<?php echo $CFG->wwwroot ?>/mod/scorm/details.php">
     <table cellpadding="5">
        <tr valign="top">
-           <td align="right"><p><b><?php print_string("name") ?>:</b></p></td>
+           <td align="right"><b><?php print_string("name") ?>:</b></td>
            <td>
-               <input type="text" name="name" size="50" value="<?php p($form->name) ?>" />
+               <input type="text" name="name" size="50" value="<?php p($form->name) ?>" alt="<?php print_string("name") ?>" />
            </td>
        </tr>
 <?php 
 ?>
        <tr valign="top">
            <td align="right" nowrap="nowrap">
-               <p><b><?php echo $strfilename?>:</b></p>
+               <b><?php echo $strfilename?>:</b>
            </td>
            <td>
                <?php
-                   echo "<input name=\"reference\" size=\"50\" value=\"$form->reference\" />&nbsp;";
-                   button_to_popup_window ("/files/index.php?id=$course->id&choose=form.reference", 
+                   echo "<input name=\"reference\" size=\"50\" value=\"$form->reference\" alt=\"$strfilename\" />&nbsp;";
+                   button_to_popup_window ("/files/index.php?id=$course->id&amp;choose=form.reference", 
                                            "coursefiles", $strchooseafile, 500, 750, $strchooseafile);
                ?>
            </td>
        </tr>
        <tr valign="top">
-           <td align="right"><p><b><?php print_string("summary") ?>:</b></p>
+           <td align="right"><b><?php print_string("summary") ?>:</b><br />
                <font size="1">
                <?php
                    helpbutton("summary", get_string("summary"), "scorm", true, true);
index b3fdde0cde23230cd71fb8b999a0b06953862df7..b93dd358374100f8afaec7a40dfca4b58359bf3a 100644 (file)
         ?>
         <form name="form" method="post" action="<?php p($form->destination)?>">
         <table cellpadding="5" align="center">
-        <tr><td align="right" nowrap="nowrap"><p><b><?php print_string("name") ?>:</b></p></td>
-            <td><p><?php p($form->name) ?></p></a></td></tr>
+        <tr><td align="right" nowrap="nowrap"><b><?php print_string("name") ?>:</b></td>
+            <td><?php p($form->name) ?></a></td></tr>
 
         <tr valign="top">
             <td align="right" nowrap="nowrap">
-                <p><b><?php print_string("introtext", "survey") ?>:</b></p><br />
+                <b><?php print_string("introtext", "survey") ?>:</b><br />
                 <font size="1">
                 <?php helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?> <br />
                 <?php helpbutton("text", get_string("helptext"), "moodle", true, true) ?> <br />
index 7273cb0566d0a824e469521fd7836e90a022a4f0..5701c6447ed3feb6e9284be9f76ddde7c50a2ccf 100644 (file)
@@ -358,8 +358,8 @@ function survey_print_multi($question) {
 
     $stripreferthat = get_string("ipreferthat", "survey");
     $strifoundthat = get_string("ifoundthat", "survey");
-    echo "<p>&nbsp</p>\n";
-       echo "<p><font size=\"4\"><b>$question->text</b></font></p>";
+    echo "<br />\n";
+       echo "<font size=\"4\"><b>$question->text</b></font><br />";
 
        echo "<table align=\"center\" width=\"90%\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\">";
 
@@ -374,15 +374,15 @@ function survey_print_multi($question) {
        }
    
     if ($oneanswer) { 
-        echo "<tr width=\"100%\" ><td colspan=\"2\"><p>$question->intro</p></td>";
+        echo "<tr><td colspan=\"2\">$question->intro</td>";
     } else {
-        echo "<tr width=\"100%\" ><td colspan=\"3\"><p>$question->intro</p></td>"; 
+        echo "<tr><td colspan=\"3\">$question->intro</td>"; 
     }
 
     while (list ($key, $val) = each ($options)) {
-        echo "<td width=\"10%\" align=\"center\"><font size=\"1\"><p>$val</p></font></td>\n";
+        echo "<td width=\"10%\" align=\"center\"><font size=\"1\">$val</font></td>\n";
     }
-    echo "<td align=\"center\" bgcolor=\"$THEME->body\">&nbsp</td></tr>\n";
+    echo "<td align=\"center\" bgcolor=\"$THEME->body\">&nbsp;</td></tr>\n";
 
     $subquestions = get_records_list("survey_questions", "id", $question->multi);
 
@@ -394,32 +394,32 @@ function survey_print_multi($question) {
             $q->text = get_string($q->text, "survey");
         }
 
-        echo "<tr bgcolor=$bgcolor>";
+        echo "<tr bgcolor=\"$bgcolor\">";
         if ($oneanswer) {
-            echo "<td width=\"10\" valign=\"top\"><p><b>$qnum</b></p></td>";
-            echo "<td valign=\"top\"><p>$q->text</p></td>";
+            echo "<td width=\"10\" valign=\"top\"><b>$qnum</b></td>";
+            echo "<td valign=\"top\">$q->text</td>";
             for ($i=1;$i<=$numoptions;$i++) {
-                echo "<td width=\"10%\" align=\"center\"><input type=\"radio\" name=\"q$P$q->id\" value=\"$i\" /></td>";
+                echo "<td width=\"10%\" align=\"center\"><input type=\"radio\" name=\"q$P$q->id\" value=\"$i\" alt=\"$i\" /></td>";
             }
-            echo "<td bgcolor=\"white\"><input type=\"radio\" name=\"q$P$q->id\" value=\"0\" checked=\"checked\" /></td>";
+            echo "<td bgcolor=\"white\"><input type=\"radio\" name=\"q$P$q->id\" value=\"0\" checked=\"checked\" alt=\"0\" /></td>";
             $checklist["q$P$q->id"] = $numoptions;
         
         } else {
-            echo "<td width=\"10\" valign=\"middle\" rowspan=\"2\"><p><b>$qnum</b></p></td>";
-            echo "<td width=\"10%\" nowrap=\"nowrap\"><p><font size=\"1\">$stripreferthat&nbsp;</font></p></td>";
-            echo "<td width=\"40%\" valign=\"middle\" rowspan=\"2\"><p>$q->text</p></td>";
+            echo "<td width=\"10\" valign=\"middle\" rowspan=\"2\"><b>$qnum</b></td>";
+            echo "<td width=\"10%\" nowrap=\"nowrap\"><font size=\"1\">$stripreferthat&nbsp;</font></td>";
+            echo "<td width=\"40%\" valign=\"middle\" rowspan=\"2\">$q->text</td>";
             for ($i=1;$i<=$numoptions;$i++) {
-                echo "<td width=\"10%\" align=\"center\"><input type=\"radio\" name=\"qP$q->id\" value=\"$i\" /></td>";
+                echo "<td width=\"10%\" align=\"center\"><input type=\"radio\" name=\"qP$q->id\" value=\"$i\" alt=\"$i\"/></td>";
             }
-            echo "<td bgcolor=\"$THEME->body\"><input type=\"radio\" name=\"qP$q->id\" value=\"0\" checked=\"checked\" /></td>";
+            echo "<td bgcolor=\"$THEME->body\"><input type=\"radio\" name=\"qP$q->id\" value=\"0\" checked=\"checked\" alt=\"0\" /></td>";
             echo "</tr>";
 
-            echo "<tr bgcolor=$bgcolor>";
-            echo "<td width=\"10%\" nowrap=\"nowrap\"><p><font size=\"1\">$strifoundthat&nbsp;</p></td>";
+            echo "<tr bgcolor=\"$bgcolor\">";
+            echo "<td width=\"10%\" nowrap=\"nowrap\"><font size=\"1\">$strifoundthat&nbsp;</font></td>";
             for ($i=1;$i<=$numoptions;$i++) {
-                echo "<td width=\"10%\" align=\"center\"><input type=\"radio\" name=\"q$q->id\" value=\"$i\" /></td>";
+                echo "<td width=\"10%\" align=\"center\"><input type=\"radio\" name=\"q$q->id\" value=\"$i\" alt=\"$i\" /></td>";
             }
-            echo "<td width=\"5%\" bgcolor=\"$THEME->body\"><input type=\"radio\" name=\"q$q->id\" value=\"0\" checked=\"checked\" /></td>";
+            echo "<td width=\"5%\" bgcolor=\"$THEME->body\"><input type=\"radio\" name=\"q$q->id\" value=\"0\" checked=\"checked\" alt=\"0\" /></td>";
             $checklist["qP$q->id"] = $numoptions;
             $checklist["q$q->id"] = $numoptions;
         }
@@ -437,20 +437,20 @@ function survey_print_single($question) {
 
     $qnum++;
 
-    echo "<p>&nbsp</p>\n";
+    echo "<br />\n";
     echo "<table align=\"center\" width=\"90%\" cellpadding=\"4\" cellspacing=\"0\">\n";
-    echo "<tr bgcolor=$bgcolor>";
+    echo "<tr bgcolor=\"$bgcolor\">";
     echo "<td valign=\"top\"><b>$qnum</b></td>";
-    echo "<td width=\"50%\" valign=\"top\"><p>$question->text</p></td>\n";
-    echo "<td width=\"50%\" valign=\"top\"><p><font size=+1>\n";
+    echo "<td width=\"50%\" valign=\"top\">$question->text</td>\n";
+    echo "<td width=\"50%\" valign=\"top\"><font size=\"+1\">\n";
 
 
     if ($question->type == 0) {           // Plain text field
-        echo "<textarea rows=\"3\" cols=\"30\" wrap=\"virtual\" name=\"$question->id\">$question->options</textarea>";
+        echo "<textarea rows=\"3\" cols=\"30\" name=\"$question->id\">$question->options</textarea>";
 
     } else if ($question->type > 0) {     // Choose one of a number
         $strchoose = get_string("choose");
-        echo "<select name=$question->id>";
+        echo "<select name=\"$question->id\">";
         echo "<option value=\"0\" selected=\"selected\">$strchoose...</option>";
         $options = explode( ",", $question->options);
         foreach ($options as $key => $val) {
index 790383d345ae5db0f64692915ffcd77b445c4dc2..d6c1666761f555bf63ee4752822b7b4feb91f6d4 100644 (file)
 <form name="form" method="post" action="../mod/survey/details.php">
 <table cellpadding="5">
 <tr valign="top">
-    <td align="right"><p><b><?php  print_string("surveyname", "survey") ?>:</b></p></td>
+    <td align="right"><b><?php  print_string("surveyname", "survey") ?>:</b></td>
     <td>
-        <input type="text" name="name" size="30" value="<?php p($form->name) ?>" />
+        <input type="text" name="name" size="30" value="<?php p($form->name) ?>" alt="<?php  print_string("surveyname", "survey") ?>" />
     </td>
 </tr>
 <tr>
-    <td align="right"><p><b><?php print_string("surveytype", "survey") ?>:</b></p></td>
+    <td align="right"><b><?php print_string("surveytype", "survey") ?>:</b></td>
     <td>
     <?php
         if ($options = get_records_menu("survey", "template", 0, "name", "id, name")) {
index cd0ec75ca216a688c7962a7b67c6daa8be4fe74d..ce0172f6dd34bc66b2bfe689c3707dc24a6b317a 100644 (file)
         print_heading($strsummary);
 
         if (survey_count_responses($survey->id, $currentgroup)) {
-            echo "<p align=\"center\"><a href=\"report.php?action=scales&amp;id=$id\">";
+            echo "<center><a href=\"report.php?action=scales&amp;id=$id\">";
             survey_print_graph("id=$id&amp;group=$currentgroup&amp;type=overall.png");
-            echo "</a>";
+            echo "</a></center>";
         } else {
             notify(get_string("nobodyyet","survey"));
         }