Choice MDL-23092 don't start page output before redirect.

This commit is contained in:
Dan Marsden
2010-07-05 23:02:17 +00:00
parent 9b854b2d21
commit ce4f56bd3e
+3 -1
View File
@@ -44,7 +44,6 @@
$PAGE->set_title(format_string($choice->name));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
/// Submit any new data if there is any
if ($form = data_submitted() && is_enrolled($context, NULL, 'mod/choice:choose') && confirm_sesskey()) {
@@ -62,7 +61,10 @@
} else {
choice_user_submit_response($answer, $choice, $USER->id, $course->id, $cm);
}
echo $OUTPUT->header();
echo $OUTPUT->notification(get_string('choicesaved', 'choice'),'notifysuccess');
} else {
echo $OUTPUT->header();
}