Highlighted

Prevent access to quiz content until event raised

Community Beginner ,
Nov 24, 2018

Copy link to clipboard

Copied

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

I was inspired by another post I found on here that talked about using an object that would persist across all slides and use JavaScript to show/hide it. Instead of doing a button, I just used a large rectangle with content in it. Works great!

Views

127

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Prevent access to quiz content until event raised

Community Beginner ,
Nov 24, 2018

Copy link to clipboard

Copied

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

I was inspired by another post I found on here that talked about using an object that would persist across all slides and use JavaScript to show/hide it. Instead of doing a button, I just used a large rectangle with content in it. Works great!

Views

128

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 24, 2018 0
Community Beginner ,
Nov 25, 2018

Copy link to clipboard

Copied

I was inspired by another post I found on here that talked about using an object that would persist across all slides and use JavaScript to show/hide it. Instead of doing a button, I just used a large rectangle with content in it. Works great!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 25, 2018 0
Most Valuable Participant ,
Nov 25, 2018

Copy link to clipboard

Copied

Why do you need JS for that? I always use objects timed for the rest of the project, and On Enter advanced or shared actions to show/hide them.

Why ot use custom navigation, and allows navigation to the quiz slides only if the required condition is fulfilled? Especially with quiz slides you have to be very careful. The shape you are using, do you want it to cover the quiz slides?  That is not clear to me, why you would need a shape to solve this original question to prevent access to quiz slides. You know perhaps that custom objects on quiz slides are always below the embedded objects in the z-order?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 25, 2018 0
Community Beginner ,
Dec 05, 2018

Copy link to clipboard

Copied

I have to use JavaScript for that because the third-party proctoring system raises a JavaScript event that I wanted to trigger the shape to disappear.

Yes, I'm using the shape to cover the slides. Works well! I believe it was one of your posts on another thread that inspired me to do it

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 05, 2018 0
Lilybiri LATEST
Most Valuable Participant ,
Dec 06, 2018

Copy link to clipboard

Copied

That is possible but since the arrival of Fluid Boxes I try to avoid stacking objects.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 06, 2018 0