Choice MDL-23092 don't start page output before redirect.
This commit is contained in:
+3
-1
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user