Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions js/instructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ activequiz.getQuizInfo = function () {
activequiz.set('inquestion', 'false');

}
} else if (status == 403 && response.errorcode == 'invalidsesskey') {
// The users session to Moodle has timed out - or they logged out.
window.alert(response.error);
// Stop here so we stop polling Moodle, until they refresh the page
// and have a new sesskey, these polls will fail.
return;
}

var time = 3000 + Math.floor(Math.random() * (100 + 100) - 100);
Expand Down
6 changes: 6 additions & 0 deletions js/student.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ activequiz.getQuizInfo = function () {
activequiz.quiz_info(M.util.get_string('sessionclosed', 'activequiz'));

}
} else if (status == 403 && response.errorcode == 'invalidsesskey') {
// The users session to Moodle has timed out - or they logged out.
window.alert(response.error);
// Stop here so we stop polling Moodle, until they refresh the page
// and have a new sesskey, these polls will fail.
return;
}

var time = 3000 + Math.floor(Math.random() * (100 + 100) - 100);
Expand Down