Uses new require_sesskey function from MDL-20702.
/// Check login.
require_login($attemptobj->get_courseid(), false, $attemptobj->get_cm());
-confirm_sesskey();
+require_sesskey();
/// Check that this attempt belongs to this user.
if ($attemptobj->get_userid() != $USER->id) {
/// Save the flag states, if they are being changed.
if ($options->flags == QUESTION_FLAGSEDITABLE && optional_param('savingflags', false, PARAM_BOOL)) {
- confirm_sesskey();
+ require_sesskey();
$formdata = data_submitted();
question_save_flags($formdata, $attemptid, $questionids);