moodle/mod/survey/mod.html

53 lines
1.9 KiB
HTML
Raw Normal View History

<?php
if (!isset($form->name)) {
2003-01-01 13:17:27 +00:00
$form->name = "";
}
if (!isset($form->template)) {
2003-01-01 13:17:27 +00:00
$form->template = "";
}
if (!isset($form->intro)) {
2003-01-01 13:17:27 +00:00
$form->intro = "";
}
?>
<form name="form" method="post" action="../mod/survey/details.php">
2001-11-22 06:23:56 +00:00
<table cellpadding=5>
<tr valign=top>
2002-08-12 17:54:13 +00:00
<td align=right><P><B><? print_string("surveyname", "survey") ?>:</B></P></TD>
2001-11-22 06:23:56 +00:00
<td>
<input type="text" name="name" size=30 value="<?php p($form->name) ?>">
2001-11-22 06:23:56 +00:00
</td>
</tr>
<tr>
<td align=right><P><B><?php print_string("surveytype", "survey") ?>:</B></P></TD>
2001-11-22 06:23:56 +00:00
<td>
<?php
2002-12-23 05:57:05 +00:00
if ($options = get_records_menu("survey", "template", 0, "name", "id, name")) {
foreach ($options as $id => $name) {
$options[$id] = get_string($name, "survey");
}
2001-11-22 06:23:56 +00:00
choose_from_menu($options, "template", $form->template);
2002-08-12 17:54:13 +00:00
helpbutton("surveys", get_string("helpsurveys", "survey"));
2001-11-22 06:23:56 +00:00
} else {
echo "No surveys to choose from!";
}
?>
</td>
</tr>
</table>
<CENTER>
<input type="hidden" name=intro value="<?php p($form->intro) ?>">
<input type="hidden" name=destination value="<?php echo "$CFG->wwwroot/course/mod.php" ?>">
2001-11-22 06:23:56 +00:00
<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") ?>">
2001-11-22 06:23:56 +00:00
</CENTER>
</FORM>