Permalink
Browse files

Make form destinations relative (to course/mod.php) to avoid

some form problems on mis-configured servers (wwwroot not quite right)
  • Loading branch information...
moodler
moodler committed Jun 10, 2003
1 parent 7789a7d commit 21b1125f63f774df4aeb3147f6e3751f30d76e31
Showing with 21 additions and 21 deletions.
  1. +1 −1 mod/quiz/mod.html
  2. +1 −1 mod/resource/mod.html
  3. +19 −19 mod/survey/mod.html
View
@@ -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>
View
@@ -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>
View
@@ -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");
@@ -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.