Skip to content

Commit

Permalink
Make form destinations relative (to course/mod.php) to avoid
Browse files Browse the repository at this point in the history
some form problems on mis-configured servers (wwwroot not quite right)
  • Loading branch information
moodler committed Jun 10, 2003
1 parent 7789a7d commit 21b1125
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion mod/quiz/mod.html
Expand Up @@ -47,7 +47,7 @@



<form name="form" method="post" action="<?php echo $CFG->wwwroot ?>/mod/quiz/edit.php">
<form name="form" method="post" action="../mod/quiz/edit.php">
<center>
<table cellpadding=5>
<tr valign=top>
Expand Down
2 changes: 1 addition & 1 deletion mod/resource/mod.html
Expand Up @@ -17,7 +17,7 @@
?>


<form name="form" method="post" action="<?php echo $CFG->wwwroot ?>/mod/resource/details.php">
<form name="form" method="post" action="../mod/resource/details.php">
<table cellpadding=5>
<tr valign=top>
<td align=right><p><b><?php print_string("name") ?>:</b></p></td>
Expand Down
38 changes: 19 additions & 19 deletions mod/survey/mod.html
@@ -1,27 +1,27 @@
<?PHP
if (empty($form->name)) {
<?php
if (!isset($form->name)) {
$form->name = "";
}
if (empty($form->template)) {
if (!isset($form->template)) {
$form->template = "";
}
if (empty($form->intro)) {
if (!isset($form->intro)) {
$form->intro = "";
}
?>

<form name="form" method="post" action="<?=$CFG->wwwroot ?>/mod/survey/details.php">
<form name="form" method="post" action="../mod/survey/details.php">
<table cellpadding=5>
<tr valign=top>
<td align=right><P><B><? print_string("surveyname", "survey") ?>:</B></P></TD>
<td>
<input type="text" name="name" size=30 value="<? p($form->name) ?>">
<input type="text" name="name" size=30 value="<?php p($form->name) ?>">
</td>
</tr>
<tr>
<td align=right><P><B><? print_string("surveytype", "survey") ?>:</B></P></TD>
<td align=right><P><B><?php print_string("surveytype", "survey") ?>:</B></P></TD>
<td>
<?
<?php
if ($options = get_records_menu("survey", "template", 0, "name", "id, name")) {
foreach ($options as $id => $name) {
$options[$id] = get_string($name, "survey");
Expand All @@ -36,17 +36,17 @@
</tr>
</table>
<CENTER>
<input type="hidden" name=intro value="<? p($form->intro) ?>">
<input type="hidden" name=destination value="<?=$ME ?>">
<input type="hidden" name=intro value="<?php p($form->intro) ?>">
<input type="hidden" name=destination value="<?php echo $ME ?>">

<input type="hidden" name=course value="<? p($form->course) ?>">
<input type="hidden" name=coursemodule value="<? p($form->coursemodule) ?>">
<input type="hidden" name=section value="<? p($form->section) ?>">
<input type="hidden" name=module value="<? p($form->module) ?>">
<input type="hidden" name=modulename value="<? p($form->modulename) ?>">
<input type="hidden" name=instance value="<? p($form->instance) ?>">
<input type="hidden" name=mode value="<? p($form->mode) ?>">
<input type="submit" value="<? print_string("savechanges") ?>">
<input type="submit" name=cancel value="<? print_string("cancel") ?>">
<input type="hidden" name=course value="<?php p($form->course) ?>">
<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>">
<input type="hidden" name=section value="<?php p($form->section) ?>">
<input type="hidden" name=module value="<?php p($form->module) ?>">
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>">
<input type="hidden" name=instance value="<?php p($form->instance) ?>">
<input type="hidden" name=mode value="<?php p($form->mode) ?>">
<input type="submit" value="<?php print_string("savechanges") ?>">
<input type="submit" name=cancel value="<?php print_string("cancel") ?>">
</CENTER>
</FORM>

0 comments on commit 21b1125

Please sign in to comment.