]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7861, fixing xhtml strict problems
authortoyomoyo <toyomoyo>
Fri, 5 Jan 2007 04:57:58 +0000 (04:57 +0000)
committertoyomoyo <toyomoyo>
Fri, 5 Jan 2007 04:57:58 +0000 (04:57 +0000)
lib/tablelib.php
mod/assignment/lib.php
mod/assignment/type/online/assignment.class.php
mod/assignment/type/upload/assignment.class.php
mod/assignment/type/uploadsingle/assignment.class.php

index aa7c37d2b6722469a56a91bc51e476db2bcec2a2..6db74ab2e35d3c5aca35cc6b7a9eb64fcb465b9b 100644 (file)
@@ -527,7 +527,8 @@ class flexible_table {
                 echo '<th class="header c'.$index.$this->column_class[$column].'" scope="col">'.$icon_hide.'</th>';
             }
             else {
-                echo '<th class="header c'.$index.$this->column_class[$column].'" nowrap="nowrap"'.$this->make_styles_string($this->column_style[$column]).' scope="col">'.$this->headers[$index].$icon_sort.'<div class="commands">'.$icon_hide.'</div></th>';
+                // took out nowrap for accessibility, might need replacement
+                echo '<th class="header c'.$index.$this->column_class[$column].'" '.$this->make_styles_string($this->column_style[$column]).' scope="col">'.$this->headers[$index].$icon_sort.'<div class="commands">'.$icon_hide.'</div></th>';
             }
 
         }
index 65f75ad51e3870d8c74b99d08c81f5e9c7fcd824..3a989ad45180dc3c6011130ad51100091d729d51 100644 (file)
@@ -886,6 +886,7 @@ class assignment_base {
         echo '</td>';
         echo '<td class="content">';
         echo '<form id="submitform" action="submissions.php" method="post">';
+        echo '<fieldset class="invisiblefieldset">';
         echo '<input type="hidden" name="offset" value="'.++$offset.'">';
         echo '<input type="hidden" name="userid" value="'.$userid.'" />';
         echo '<input type="hidden" name="id" value="'.$this->cm->id.'" />';
@@ -929,6 +930,7 @@ class assignment_base {
             echo '<input type="submit" name="next" value="'.get_string('next').'" onclick="setNext();" />';
         }
         echo '</div>';
+        echo '</fieldset>';
         echo '</form>';
 
         $customfeedback = $this->custom_feedbackform($submission, true);
@@ -1060,7 +1062,7 @@ class assignment_base {
         $table->set_attribute('id', 'attempts');
         $table->set_attribute('class', 'submissions');
         $table->set_attribute('width', '90%');
-        $table->set_attribute('align', 'center');
+        //$table->set_attribute('align', 'center');
             
         // Start working -- this is necessary as soon as the niceties are over
         $table->setup();
@@ -1187,16 +1189,18 @@ class assignment_base {
         /// Print quickgrade form around the table
         if ($quickgrade){
             echo '<form action="submissions.php" id="fastg" method="post">';
+            echo '<fieldset class="invisiblefieldset">';
             echo '<input type="hidden" name="id" value="'.$this->cm->id.'">';
             echo '<input type="hidden" name="mode" value="fastgrade">';
             echo '<input type="hidden" name="page" value="'.$page.'">';
-            echo '<p align="center"><input type="submit" name="fastg" value="'.get_string('saveallfeedback', 'assignment').'" /></p>';
+            echo '<div style="text-align:center"><input type="submit" name="fastg" value="'.get_string('saveallfeedback', 'assignment').'" /></div>';
         }
 
         $table->print_html();  /// Print the whole table
 
         if ($quickgrade){
-            echo '<p align="center"><input type="submit" name="fastg" value="'.get_string('saveallfeedback', 'assignment').'" /></p>';
+            echo '<div style="text-align:center"><input type="submit" name="fastg" value="'.get_string('saveallfeedback', 'assignment').'" /></div>';
+            echo '</fieldset>';
             echo '</form>';
         }
         /// End of fast grading form
@@ -1204,8 +1208,9 @@ class assignment_base {
         /// Mini form for setting user preference
         echo '<br />';
         echo '<form id="options" action="submissions.php?id='.$this->cm->id.'" method="post">';
+        echo '<fieldset class="invisiblefieldset">';
         echo '<input type="hidden" id="updatepref" name="updatepref" value="1" />';
-        echo '<table id="optiontable" align="center">';
+        echo '<table id="optiontable">';
         echo '<tr align="right"><td>';
         echo '<label for="perpage">'.get_string('pagesize','assignment').'</label>';
         echo ':</td>';
@@ -1229,6 +1234,7 @@ class assignment_base {
         echo '<td colspan="2" align="right">';
         echo '<input type="submit" value="'.get_string('savepreferences').'" />';
         echo '</td></tr></table>';
+        echo '</fieldset>';
         echo '</form>';
         ///End of mini form
         print_footer($this->course);
index 0c510f11f55ef42570c3eab4c7ee447ad2f3e989..6215b033be9082073e4742e1b0020ade7a1afdef 100644 (file)
@@ -100,9 +100,9 @@ class assignment_online extends assignment_base {
                 if ($submission) {
                     echo format_text($submission->data1, $submission->data2);
                 } else if (!has_capability('mod/assignment:submit', $context)) { //fix for #4604
-                    echo '<center>'. get_string('guestnosubmit', 'assignment').'</center>';
+                    echo '<div style="text-align:center">'. get_string('guestnosubmit', 'assignment').'</div>';
                 } else if ($this->isopen()){    //fix for #4206
-                    echo '<center>'.get_string('emptysubmission', 'assignment').'</center>';
+                    echo '<div style="text-align:center">'.get_string('emptysubmission', 'assignment').'</div>';
                 }
                 if ($editable) {
                     print_single_button('view.php', array('id'=>$this->cm->id, 'edit'=>'1'),
index 2d4e4f58a3e5825e1fafbd83d3b7733b8a0f6b43..f6de3a6677eb4deba3bdd016e8ec58e003e72c61 100644 (file)
@@ -147,16 +147,18 @@ class assignment_upload extends assignment_base {
         }
 
         if ($this->can_upload_file($submission)) {
-            echo '<center>';
+            echo '<div style="text-align:center">';
             echo '<form enctype="multipart/form-data" method="post" action="upload.php">';
+            echo '<fieldset class="invisiblefieldset">';
             echo "<p>$struploadafile ($strmaxsize)</p>";
             echo '<input type="hidden" name="id" value="'.$this->cm->id.'" />';
             echo '<input type="hidden" name="action" value="uploadfile" />';
             require_once($CFG->libdir.'/uploadlib.php');
             upload_print_form_fragment(1,array('newfile'),null,false,null,0,$this->assignment->maxbytes,false);
             echo '<input type="submit" name="save" value="'.get_string('uploadthisfile').'" />';
+            echo '</fieldset>';
             echo '</form>';
-            echo '</center>';
+            echo '</div>';
             echo '<br />';
         }
 
@@ -173,9 +175,9 @@ class assignment_upload extends assignment_base {
         }
         if ($this->can_update_notes($submission)) {
             $options = array ('id'=>$this->cm->id, 'action'=>'editnotes');
-            echo '<center>';
+            echo '<div style="text-align:center">';
             print_single_button('upload.php', $options, get_string('edit'), 'post', '_self', false);
-            echo '</center>';
+            echo '</div>';
         }
     }
 
@@ -187,13 +189,15 @@ class assignment_upload extends assignment_base {
         if ($this->can_finalize($submission)) {
             //print final submit button
             print_heading(get_string('submitformarking','assignment'), '', 3);
-            echo '<center>';
+            echo '<div style="text-align:center">';
             echo '<form method="post" action="upload.php">';
+            echo '<fieldset class="invisiblefieldset">';
             echo '<input type="hidden" name="id" value="'.$this->cm->id.'" />';
             echo '<input type="hidden" name="action" value="finalize" />';
             echo '<input type="submit" name="formarking" value="'.get_string('sendformarking', 'assignment').'" />';
+            echo '</fieldset>';
             echo '</form>';
-            echo '</center>';
+            echo '</div>';
         } else if ($this->is_finalized($submission)) {
             print_heading(get_string('submitedformarking','assignment'), '', 3);
         } else {
index 25e7fd5d0067f0f3c9f3b681bfc0b97357169bd4..1930ef3a03d6a28c64c481449ee26c45e3b2dcd5 100644 (file)
@@ -83,16 +83,18 @@ class assignment_uploadsingle extends assignment_base {
         $struploadafile = get_string("uploadafile");
         $strmaxsize = get_string("maxsize", "", display_size($this->assignment->maxbytes));
 
-        echo '<center>';
+        echo '<div style="text-align:center">';
         echo '<form enctype="multipart/form-data" method="post" '.
              "action=\"$CFG->wwwroot/mod/assignment/upload.php\">";
+        echo '<fieldset class="invisiblefieldset">';
         echo "<p>$struploadafile ($strmaxsize)</p>";
         echo '<input type="hidden" name="id" value="'.$this->cm->id.'" />';
         require_once($CFG->libdir.'/uploadlib.php');
         upload_print_form_fragment(1,array('newfile'),false,null,0,$this->assignment->maxbytes,false);
         echo '<input type="submit" name="save" value="'.get_string('uploadthisfile').'" />';
+        echo '</fieldset>';
         echo '</form>';
-        echo '</center>';
+        echo '</div>';
     }