Prevent access to quiz content until event raised
I've got a quiz that I'm publishing to xAPI. The quiz works great currently, but we also have an online proctoring/id verification solution that we're installing. To prevent users from completing the quiz if they don't have a webcam, we wanted to prevent access to the exam until a certain variable reads a certain value.
I've got the javaScript to check for the variable value, but have no idea how to prevent access to the quiz and then grant it.
We'd also like to preserve the resume data so if the user returns they are able to pick up where they left off, but of course ONLY after the variable is set appropriately.
var tinterval = setInterval(function () {
if (window.IntegrityAdvocate.status == "IA_Stream") {
// GRANT ACCESS HERE
}
}, 1000); // check for updated variable every second
