(MDL-9470) Survey submission JS broken; merged from MOODLE_18_STABLE

This commit is contained in:
skodak
2007-04-20 17:52:41 +00:00
parent ca80f999ce
commit a33bbfddfc
+3 -3
View File
@@ -111,7 +111,7 @@
// Start the survey form
add_to_log($course->id, "survey", "view form", "view.php?id=$cm->id", $survey->id, $cm->id);
echo "<form method=\"post\" action=\"save.php\">";
echo "<form method=\"post\" action=\"save.php\" id=\"surveyform\">";
echo '<div>';
echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />";
@@ -172,7 +172,7 @@ function checkform() {
var error=false;
with (getElementById('form')) {
with (document.getElementById('surveyform')) {
<?php
if (!empty($checklist)) {
foreach ($checklist as $question => $default) {
@@ -185,7 +185,7 @@ function checkform() {
if (error) {
alert("<?php print_string("questionsnotanswered", "survey") ?>");
} else {
getElementById('form').submit();
document.getElementById('surveyform').submit();
}
}