mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-71728 mod_quiz: check if user can access this page
This commit is contained in:
parent
efdf0e48c8
commit
da05f15e3b
@ -85,6 +85,12 @@ if ($attemptobj->is_finished()) {
|
||||
'attemptalreadyclosed', null, $attemptobj->review_url());
|
||||
}
|
||||
|
||||
// If this page cannot be accessed, notify user and send them to the correct page.
|
||||
if (!$finishattempt && !$attemptobj->check_page_access($thispage)) {
|
||||
throw new moodle_exception('submissionoutofsequencefriendlymessage', 'question',
|
||||
$attemptobj->attempt_url(null, $attemptobj->get_currentpage()));
|
||||
}
|
||||
|
||||
// Process the attempt, getting the new status for the attempt.
|
||||
$status = $attemptobj->process_attempt($timenow, $finishattempt, $timeup, $thispage);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user