MDL-51703 mod_survey: Trigger response_submitted event in correct place
This commit is contained in:
+8
-8
@@ -54,14 +54,6 @@
|
||||
print_error('invalidsurveyid', 'survey');
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'context' => $context,
|
||||
'courseid' => $course->id,
|
||||
'other' => array('surveyid' => $survey->id)
|
||||
);
|
||||
$event = \mod_survey\event\response_submitted::create($params);
|
||||
$event->trigger();
|
||||
|
||||
$strsurveysaved = get_string('surveysaved', 'survey');
|
||||
|
||||
$PAGE->set_title($strsurveysaved);
|
||||
@@ -121,6 +113,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'context' => $context,
|
||||
'courseid' => $course->id,
|
||||
'other' => array('surveyid' => $survey->id)
|
||||
);
|
||||
$event = \mod_survey\event\response_submitted::create($params);
|
||||
$event->trigger();
|
||||
|
||||
// Print the page and finish up.
|
||||
|
||||
notice(get_string("thanksforanswers","survey", $USER->firstname), "$CFG->wwwroot/course/view.php?id=$course->id");
|
||||
|
||||
Reference in New Issue
Block a user