]> git.mjollnir.org Git - moodle.git/commitdiff
Some changes for XHTML and accessibility compliance
authormoodler <moodler>
Tue, 28 Sep 2004 09:47:14 +0000 (09:47 +0000)
committermoodler <moodler>
Tue, 28 Sep 2004 09:47:14 +0000 (09:47 +0000)
lib/weblib.php
mod/forum/discuss.php
mod/forum/lib.php

index aa332914c922f671f298d860b56a9da82bc9b169..44196c271123f2bbc5aeca4584e33517cdbbbda2 100644 (file)
@@ -667,9 +667,15 @@ function popup_form($common, $options, $formname, $selected='', $nothing='choose
         $output .= "   <option value=\"javascript:void(0)\">$nothing</option>\n";
     }
 
+    $inoptgroup = false;
     foreach ($options as $value => $label) {
         if (substr($label,0,2) == '--') {
-            $output .= '   <optgroup label="'. $label .'"></optgroup>';   // Plain labels
+            if ($inoptgroup) {
+                $output .= '   </optgroup>';
+            } else {
+                $inoptgroup = true;
+            }
+            $output .= '   <optgroup label="'. $label .'">';   // Plain labels
             continue;
         } else {
             $output .= '   <option value="'. $common . $value .'"';
@@ -683,6 +689,9 @@ function popup_form($common, $options, $formname, $selected='', $nothing='choose
             $output .= '>'. $value .'</option>' . "\n";
         }
     }
+    if ($inoptgroup) {
+        $output .= '    </optgroup>';
+    }
     $output .= '</select>';
     $output .= '</form>' . "\n";
 
@@ -3390,4 +3399,4 @@ function print_speller_button () {
     echo '<input type="button" value="Check spelling" onclick="openSpellChecker();" />'."\n";
 }
 // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
-?>
\ No newline at end of file
+?>
index b4c6613766f509fa78c6dd99a31e88c5ba4d91ed..f2ca6b69ea502f0a0ece682a3536522ff337177e 100644 (file)
 
     if ($course->category) {
         print_header("$course->shortname: $discussion->name", "$course->fullname",
-                 "<a href=../../course/view.php?id=$course->id>$course->shortname</a> ->
+                 "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
                   $navmiddle -> $navtail", "", "", true, $searchform, navmenu($course, $cm));
     } else {
         print_header("$course->shortname: $discussion->name", "$course->fullname",
index 0b7a8cab86cbe525793e1a415461baf7ff4a5f45..17f304d3a12e06a36996fd5d364a72d3aeb7cd5e 100644 (file)
@@ -1816,7 +1816,7 @@ function forum_print_search_form($course, $search="", $return=false, $type="") {
         $output = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td nowrap=\"nowrap\">";
         $output .= "<form name=\"search\" action=\"$CFG->wwwroot/mod/forum/search.php\">";
         $output .= "<font size=\"-1\">";
-        $output .= "<input name=\"search\" type=\"text\" size=\"15\" value=\"$search\" />";
+        $output .= "<input name=\"search\" type=\"text\" size=\"15\" value=\"$search\" alt=\"search\" />";
         $output .= "<input value=\"".get_string("searchforums", "forum")."\" type=\"submit\" />";
         $output .= "</font>";
         $output .= "<input name=\"id\" type=\"hidden\" value=\"$course->id\" />";
@@ -1826,7 +1826,7 @@ function forum_print_search_form($course, $search="", $return=false, $type="") {
         $output = "<table border=\"0\" cellpadding=\"10\" cellspacing=\"0\"><tr><td align=\"center\">";
         $output .= "<form name=\"search\" action=\"$CFG->wwwroot/mod/forum/search.php\">";
         $output .= "<font size=\"-1\">";
-        $output .= "<input name=\"search\" type=\"text\" size=\"15\" value=\"$search\" /><br />";
+        $output .= "<input name=\"search\" type=\"text\" size=\"15\" value=\"$search\" alt=\"search\" /><br />";
         $output .= "<input value=\"".get_string("searchforums", "forum")."\" type=\"submit\" />";
         $output .= "</font>";
         $output .= "<input name=\"id\" type=\"hidden\" value=\"$course->id\" />";