set_config("resource_parametersettings", "0");
}
-$RESOURCE_WINDOW_OPTIONS = array("resizable", "scrollbars", "directories", "location",
- "menubar", "toolbar", "status", "height", "width");
+$RESOURCE_WINDOW_OPTIONS = array('resizable', 'scrollbars', 'directories', 'location',
+ 'menubar', 'toolbar', 'status', 'height', 'width');
foreach ($RESOURCE_WINDOW_OPTIONS as $popupoption) {
$popupoption = "resource_popup$popupoption";
if (!isset($CFG->$popupoption)) {
- if ($popupoption == "resource_popupheight") {
+ if ($popupoption == 'resource_popupheight') {
set_config($popupoption, 450);
- } else if ($popupoption == "resource_popupwidth") {
+ } else if ($popupoption == 'resource_popupwidth') {
set_config($popupoption, 620);
} else {
- set_config($popupoption, "checked");
+ set_config($popupoption, 'checked');
}
}
}
<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="65" value="<?php p($form->name) ?>" alt="<?php print_string("name") ?>" />
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("summary") ?>:</b></p>
- <font size="1">
+ <td align="right"><b><?php print_string("summary") ?>:</b><br />
<?php
helpbutton("summary", get_string("summary"), "resource", true, true);
?>
<br />
- </font>
</td>
<td>
<?php print_textarea($usehtmleditor, 10, 65, 680, 400, "summary", $form->summary); ?>
</script>
- <p><b><?php echo $strfilename ?>:</b></p>
+ <b><?php echo $strfilename ?>:</b>
</td>
<td>
<?php
- echo "<input name=\"reference\" size=\"90\" value=\"$form->reference\" alt=\"reference\" /><br />";
- button_to_popup_window ("/files/index.php?id=$form->course&choose=form.reference", "coursefiles", $strchooseafile, 500, 750, $strchooseafile);
+ echo "<input type=\"text\" name=\"reference\" size=\"90\" value=\"$form->reference\" alt=\"reference\" /><br />";
+ button_to_popup_window ("/files/index.php?id=$form->course&choose=form.reference", "coursefiles", $strchooseafile, 500, 750, $strchooseafile);
echo "<input type=\"button\" name=\"searchbutton\" value=\"$strsearch ...\" ".
"onclick=\"return window.open('$CFG->resource_websearch', 'websearch', 'menubar=1,location=1,directories=1,toolbar=1,scrollbars,resizable,width=800,height=600');\" />\n";
?>
<tr><td colspan="2"><hr /></td></tr>
<tr>
- <td align="right"><p><b><?php print_string("display", "resource") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("display", "resource") ?>:</b></td>
<td>
<input type="button" value="hide settings" id="windowsettingsbutton" onclick="javascript: return showhide('windowsettings');" />
<input type="hidden" name="windowsettingspref" id="windowsettingspref"
</td></tr>
<tr>
- <td align="right"><p><b><?php print_string("parameters", "resource") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("parameters", "resource") ?>:</b></td>
<td>
<input type="button" value="hide settings" id="parametersettingsbutton" onclick="javascript: return showhide('parametersettings');" />
<input type="hidden" name="parametersettingspref" id="parametersettingspref"
<table align="center">
<tr>
- <td align="center"><p><?php print_string("parameter", "resource") ?></p></td>
- <td align="center"><p><?php print_string("variablename", "resource") ?></p></td>
+ <td align="center"><?php print_string("parameter", "resource") ?></td>
+ <td align="center"><?php print_string("variablename", "resource") ?></td>
</tr>
<?php
$option = explode('=', trim($rawoption));
$optionname = $option[0];
$optionvalue = $option[1];
- if ($optionname == "height" or $optionname == "width") {
+ if ($optionname == 'height' or $optionname == 'width') {
$window->$optionname = $optionvalue;
} else if ($optionvalue) {
- $window->$optionname = "checked=\"checked\"";
+ $window->$optionname = 'checked="checked"';
}
}
}
} else {
foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) {
$defaultvalue = "resource_popup$optionname";
- $window->$optionname = $CFG->$defaultvalue;
+
+ if ($optionname == 'height' or $optionname == 'width') {
+ $window->$optionname = $CFG->$defaultvalue;
+ } else if ($CFG->$defaultvalue) {
+ $window->$optionname = 'checked="checked"';
+ }
}
$windowtype = ($CFG->resource_popup) ? 'popup' : 'page';
</script>
- <p><b><?php print_string("fulltext", "resource") ?>:</b></p><br />
- <font size="1">
+ <b><?php print_string("fulltext", "resource") ?>:</b><br />
<?php helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br />
- <?php helpbutton("text", get_string("helptext"), "moodle", true, true) ?> <br />
+ <?php helpbutton("text", get_string("helptext"), "moodle", true, true) ?><br />
<?php emoticonhelpbutton("theform", "alltext") ?> <br />
- </font>
</td>
<td>
<?php print_textarea($usehtmleditor, 30, 60, 680, 500, "alltext", $form->alltext); ?>
<tr><td colspan="2"><hr /></td></tr>
<tr>
- <td align="right"><p><b><?php print_string("display", "resource") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("display", "resource") ?>:</b></td>
<td>
<input type="button" value="hide settings" id="windowsettingsbutton" onclick="javascript: return showhide('windowsettings');" />
<input type="hidden" name="windowsettingspref" id="windowsettingspref"
var popupitems = [<?php echo $popupoptions; ?>];
var allitems = [<?php echo $alloptions; ?>];
</script>
- <input type="radio" name="windowpopup" value="0" <?php echo ($windowtype != "popup") ? "checked=\"checked\"" : "" ?>
+ <input type="radio" name="windowpopup" value="0" alt="<?php print_string('pagewindow', 'resource') ?>" <?php echo ($windowtype != 'popup') ? 'checked="checked"' : '' ?>
onclick="return lockoptions('form', 'windowpopup[1]', popupitems);" />
- <b title="<?php print_string("pagedisplay", "resource") ?>"><?php print_string("pagewindow", "resource") ?></b>
+ <b title="<?php print_string('pagedisplay', 'resource') ?>"><?php print_string('pagewindow', 'resource') ?></b>
</td>
</tr>
<tr valign="top">
<td colspan="2">
- <input name="windowpopup" type="radio" value="1" <?php echo ($windowtype == "popup") ? "checked=\"checked\"" : "" ?>
+ <input name="windowpopup" type="radio" value="1" alt="<?php p($strnewwindow) ?>" <?php echo ($windowtype == "popup") ? "checked=\"checked\"" : "" ?>
onclick=" return lockoptions('form', 'windowpopup[1]', popupitems);" />
<b title="<?php p($strnewwindowopen) ?>"><?php p($strnewwindow) ?></b>
<blockquote>
if ($name == "height" or $name == "width") {
continue;
}
- echo "<input name=\"h$name\" type=\"hidden\" value=\"0\" />";
- echo "<input name=\"$name\" type=\"checkbox\" value=\"1\" ".$window->$name." />";
$stringname = "str$name";
+ echo "<input name=\"h$name\" type=\"hidden\" value=\"0\" />";
+ echo "<input name=\"$name\" type=\"checkbox\" value=\"1\" alt=\"<?php echo $$stringname ?>\" ".$window->$name." />";
echo $$stringname."<br />";
}
?>
<input name="hwidth" type="hidden" value="0" />
- <input name="width" type="text" size="4" value="<?php p($window->width) ?>" />
+ <input name="width" type="text" size="4" value="<?php p($window->width) ?>" alt="<?php p($strwidth) ?>" />
<?php p($strwidth) ?><br />
<input name="hheight" type="hidden" value="0" />
- <input name="height" type="text" size="4" value="<?php p($window->height) ?>" />
+ <input name="height" type="text" size="4" value="<?php p($window->height) ?>" alt="<?php p($strheight) ?>"/>
<?php p($strheight) ?><br />
<?php
if ($windowtype == "page") {
if ($optionname == "height" or $optionname == "width") {
$window->$optionname = $optionvalue;
} else if ($optionvalue) {
- $window->$optionname = "checked=\"checked\"";
+ $window->$optionname = 'checked="checked"';
}
}
}
} else {
foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) {
$defaultvalue = "resource_popup$optionname";
- $window->$optionname = $CFG->$defaultvalue;
+
+ if ($optionname == "height" or $optionname == "width") {
+ $window->$optionname = $CFG->$defaultvalue;
+ } else if ($CFG->$defaultvalue) {
+ $window->$optionname = 'checked="checked"';
+ }
}
$windowtype = ($CFG->resource_popup) ? 'popup' : 'page';
if ($optionname == "height" or $optionname == "width") {
$window->$optionname = $optionvalue;
} else if ($optionvalue) {
- $window->$optionname = "checked=\"checked\"";
+ $window->$optionname = 'checked="checked"';
}
}
}
} else {
foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) {
$defaultvalue = "resource_popup$optionname";
- $window->$optionname = $CFG->$defaultvalue;
+
+ if ($optionname == "height" or $optionname == "width") {
+ $window->$optionname = $CFG->$defaultvalue;
+ } else if ($CFG->$defaultvalue) {
+ $window->$optionname = 'checked="checked"';
+ }
}
$windowtype = ($CFG->resource_popup) ? 'popup' : 'page';
- <p><b><?php print_string("fulltext", "resource") ?>:</b></p><br />
- <font size="1">
+ <b><?php print_string("fulltext", "resource") ?>:</b><br />
<?php helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br />
<?php emoticonhelpbutton("theform", "alltext") ?> <br />
- </font>
</td>
<td>
<?php print_textarea(false, 30, 65, 680, 400, "alltext", $form->alltext); ?>
</tr>
<tr valign="top">
<td align="right" nowrap="nowrap">
- <p><b><?php print_string("formattexttype") ?>:</b></p><br />
+ <b><?php print_string("formattexttype") ?>:</b><br />
</td>
<td>
<?php
<tr>
- <td align="right"><p><b><?php print_string("display", "resource") ?>:</b></p></td>
+ <td align="right"><b><?php print_string("display", "resource") ?>:</b></td>
<td>
<input type="button" value="hide settings" id="windowsettingsbutton" onclick="javascript: return showhide('windowsettings');" />
<input type="hidden" name="windowsettingspref" id="windowsettingspref"
var popupitems = [<?php echo $popupoptions; ?>];
var allitems = [<?php echo $alloptions; ?>];
</script>
- <input type="radio" name="windowpopup" value="0" <?php echo ($windowtype != "popup") ? "checked=\"checked\"" : "" ?>
+ <input type="radio" name="windowpopup" value="0" alt="<?php print_string("pagewindow", "resource") ?>" <?php echo ($windowtype != "popup") ? 'checked="checked"' : '' ?>
onclick="return lockoptions('form', 'windowpopup[1]', popupitems);" />
<b title="<?php print_string("pagedisplay", "resource") ?>"><?php print_string("pagewindow", "resource") ?></b>
<?php print_string("pagedisplay", "resource") ?>
<tr valign="top">
<td colspan="2">
- <input name="windowpopup" type="radio" value="1" <?php echo ($windowtype == "popup") ? "checked=\"checked\"" : "" ?>
+ <input name="windowpopup" type="radio" value="1" alt="<?php p($strnewwindowopen) ?>" <?php echo ($windowtype == "popup") ? "checked=\"checked\"" : "" ?>
onclick=" return lockoptions('form', 'windowpopup[1]', popupitems);" />
<b title="<?php p($strnewwindowopen) ?>"><?php p($strnewwindow) ?></b>
<?php p($strnewwindowopen) ?>
if ($name == "height" or $name == "width") {
continue;
}
- echo "<input name=\"h$name\" type=\"hidden\" value=\"0\" />";
- echo "<input name=\"$name\" type=\"checkbox\" value=\"1\" ".$window->$name." />";
+ echo '<input name="h'.$name.'" type="hidden" value="0" />';
+ echo '<input name="'.$name.'" type="checkbox" value="1" alt="'.$$stringname.'" '.$window->$name.' />';
$stringname = "str$name";
echo $$stringname."<br />";
}