$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 .'"';
$output .= '>'. $value .'</option>' . "\n";
}
}
+ if ($inoptgroup) {
+ $output .= ' </optgroup>';
+ }
$output .= '</select>';
$output .= '</form>' . "\n";
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
+?>
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",
$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\" />";
$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\" />";