Skip to content

Commit

Permalink
towards XHTML compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
gustav_delius committed Sep 14, 2004
1 parent 7a57f36 commit e0b7b09
Show file tree
Hide file tree
Showing 27 changed files with 397 additions and 396 deletions.
4 changes: 2 additions & 2 deletions mod/exercise/lib.php
Expand Up @@ -90,15 +90,15 @@ function exercise_choose_from_menu ($options, $name, $selected="", $nothing="cho
if ($nothing) {
$output .= " <option value=\"$nothingvalue\"\n";
if ($nothingvalue == $selected) {
$output .= " SELECTED";
$output .= " selected=\"selected\"";
}
$output .= ">$nothing</option>\n";
}
if (!empty($options)) {
foreach ($options as $value => $label) {
$output .= " <option value=\"$value\"";
if ($value == $selected) {
$output .= " SELECTED";
$output .= " selected=\"selected\"";
}
// stop zero label being replaced by array index value
// if ($label) {
Expand Down
32 changes: 16 additions & 16 deletions mod/glossary/config.html
Expand Up @@ -25,9 +25,9 @@
$yselected = "";
$nselected = "";
if ($CFG->glossary_studentspost) {
$yselected = " SELECTED ";
$yselected = " selected=\"selected\" ";
} else {
$nselected = " SELECTED ";
$nselected = " selected=\"selected\" ";
}
?>
<option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
Expand All @@ -46,9 +46,9 @@
$yselected = "";
$nselected = "";
if ($CFG->glossary_dupentries) {
$yselected = " SELECTED ";
$yselected = " selected=\"selected\" ";
} else {
$nselected = " SELECTED ";
$nselected = " selected=\"selected\" ";
}
?>
<option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
Expand All @@ -67,9 +67,9 @@
$yselected = "";
$nselected = "";
if ($CFG->glossary_allowcomments) {
$yselected = " SELECTED ";
$yselected = " selected=\"selected\" ";
} else {
$nselected = " SELECTED ";
$nselected = " selected=\"selected\" ";
}
?>
<option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
Expand All @@ -88,9 +88,9 @@
$yselected = "";
$nselected = "";
if ($CFG->glossary_linkbydefault) {
$yselected = " SELECTED ";
$yselected = " selected=\"selected\" ";
} else {
$nselected = " SELECTED ";
$nselected = " selected=\"selected\" ";
}
?>
<option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
Expand All @@ -109,9 +109,9 @@
$yselected = "";
$nselected = "";
if ($CFG->glossary_defaultapproval) {
$yselected = " SELECTED ";
$yselected = " selected=\"selected\" ";
} else {
$nselected = " SELECTED ";
$nselected = " selected=\"selected\" ";
}
?>
<option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
Expand All @@ -133,9 +133,9 @@
$yselected = "";
$nselected = "";
if ($CFG->glossary_linkentries) {
$yselected = " SELECTED ";
$yselected = " selected=\"selected\" ";
} else {
$nselected = " SELECTED ";
$nselected = " selected=\"selected\" ";
}
?>
<option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
Expand All @@ -154,9 +154,9 @@
$yselected = "";
$nselected = "";
if ($CFG->glossary_casesensitive) {
$yselected = " SELECTED ";
$yselected = " selected=\"selected\" ";
} else {
$nselected = " SELECTED ";
$nselected = " selected=\"selected\" ";
}
?>
<option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
Expand All @@ -175,9 +175,9 @@
$yselected = "";
$nselected = "";
if ($CFG->glossary_fullmatch) {
$yselected = " SELECTED ";
$yselected = " selected=\"selected\" ";
} else {
$nselected = " SELECTED ";
$nselected = " selected=\"selected\" ";
}
?>
<option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
Expand Down
4 changes: 2 additions & 2 deletions mod/glossary/edit.html
Expand Up @@ -32,7 +32,7 @@
echo " <option ";
if (isset($newentry->id)) {
if ( record_exists("glossary_entries_categories","entryid",$newentry->id,"categoryid",$category->id) ) {
echo "selected " ;
echo "selected=\"selected\" " ;
}
}
echo "value=\"$category->id\">$category->name</option>\n";
Expand Down Expand Up @@ -67,7 +67,7 @@
echo '<script>var items = [\'casesensitive\',\'fullmatch\'];</script>';

if (!empty($newentry->usedynalink)) {
$selected = "checked";
$selected = "checked=\"checked\"";
} else {
$selected = "";
}
Expand Down
4 changes: 2 additions & 2 deletions mod/glossary/editcategories.html
Expand Up @@ -17,12 +17,12 @@
<select size="1" name="usedynalink">
<option value="1" <?php
if ( $usedynalink ) {
echo "selected";
echo "selected=\"selected\"";
}
?>><?php echo get_string("yes") ?></option>
<option value="0" <?php
if ( !$usedynalink ) {
echo "selected";
echo "selected=\"selected\"";
}
?>><?php echo get_string("no") ?>
</option>
Expand Down
32 changes: 16 additions & 16 deletions mod/glossary/formats.php
Expand Up @@ -111,19 +111,19 @@
$sdate = '';
switch ( strtolower($displayformat->defaultmode) ) {
case 'letter':
$sletter = ' SELECTED ';
$sletter = ' selected="selected" ';
break;

case 'cat':
$scat = ' SELECTED ';
$scat = ' selected="selected" ';
break;

case 'date':
$sdate = ' SELECTED ';
$sdate = ' selected="selected" ';
break;

case 'author':
$sauthor = ' SELECTED ';
$sauthor = ' selected="selected" ';
break;
}
?>
Expand All @@ -148,19 +148,19 @@
$snocategorised = '';
switch ( strtolower($displayformat->defaulthook) ) {
case 'all':
$sall = ' SELECTED ';
$sall = ' selected="selected" ';
break;

case 'special':
$sspecial = ' SELECTED ';
$sspecial = ' selected="selected" ';
break;

case '0':
$sallcategories = ' SELECTED ';
$sallcategories = ' selected="selected" ';
break;

case '-1':
$snocategorised = ' SELECTED ';
$snocategorised = ' selected="selected" ';
break;
}
?>
Expand All @@ -185,19 +185,19 @@
$screation = '';
switch ( strtolower($displayformat->sortkey) ) {
case 'firstname':
$sfname = ' SELECTED ';
$sfname = ' selected="selected" ';
break;

case 'lastname':
$slname = ' SELECTED ';
$slname = ' selected="selected" ';
break;

case 'creation':
$screation = ' SELECTED ';
$screation = ' selected="selected" ';
break;

case 'update':
$supdate = ' SELECTED ';
$supdate = ' selected="selected" ';
break;
}
?>
Expand All @@ -220,11 +220,11 @@
$sdesc = '';
switch ( strtolower($displayformat->sortorder) ) {
case 'asc':
$sasc = ' SELECTED ';
$sasc = ' selected="selected" ';
break;

case 'desc':
$sdesc = ' SELECTED ';
$sdesc = ' selected="selected" ';
break;
}
?>
Expand All @@ -244,9 +244,9 @@
$yselected = "";
$nselected = "";
if ($displayformat->showgroup) {
$yselected = " SELECTED ";
$yselected = " selected=\"selected\" ";
} else {
$nselected = " SELECTED ";
$nselected = " selected=\"selected\" ";
}
?>
<option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/import.html
Expand Up @@ -18,7 +18,7 @@
<td width="25%">
<p align="right"><?php p(get_string("destination","glossary")) ?>:</td>
<td width="25%"><select size="1" name="dest">
<option selected value="current"><?php p(get_string("currentglossary","glossary")) ?></option>
<option selected="selected" value="current"><?php p(get_string("currentglossary","glossary")) ?></option>
<option value="new"><?php p(get_string("newglossary","glossary")) ?></option>
</select> <?php helpbutton("destination", get_string("destination", "glossary"), "glossary") ?></td>
<td width="25%">
Expand Down

0 comments on commit e0b7b09

Please sign in to comment.