• I use this plugin in a professional setting and have had issues with the quiz losing state and begin skipping questions for approximately 1.5% of users. This results in the user failing the quiz. In my investigations it seems to occur more often with users utilizing an ad blocker or other security protocols.

    When I asked our web developers they said that this is occurring because of the additional code below we add. This code refreshes the page when the browser tab is no longer visible. This is necessary as otherwise the quiz timer does not work properly.

    Overall, I would like clarity on 1) Is the below code causing issues with the exam? 2) If so, how do we ensure the timer is correct? 3) Are there minimum system requirements users need to prevent the quiz from losing state?

    I tested the quizzes on a M1 mac and can never duplicate the users issues, but I have seen video of the quiz shuffling is causing errors.

    Thank you,

    document.addEventListener("visibilitychange", function() {

    if (document.hidden){

    console.log("Browser tab is hidden")

    } else {

    location.reload();

    console.log("Browser tab is visible")

    }

    });

    }

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support brianvu-tp

    (@briantp)

    Hi jgdraper328,

    Thank you for contacting us.

    To accurately reproduce the issue you’re describing, could you please provide the following details:

    • Theme: What WordPress theme are you currently using?
    • Script Location: Where exactly did you add the provided JavaScript code snippet?

    Knowing these details will help us replicate your setup and investigate the potential conflicts between the script and LearnPress’s quiz functionality.

    Best regards,
    Brianvu-tp

    Thread Starter adarkerforest

    (@jgdraper328)

    Hi Braianvu-tp,

    We are using a custom theme built off timber: https://github.com/timber/starter-theme.

    The script is being enqued in the function.php file for the specific urls for those quizzes.

    Through some troubleshooting: We have thee Random Quiz plug in. I found one exam worked and the other didn’t. The difference was entering a value for 0 for all questions or inputting the number of all the questions. When entering a value of 0 for all questions, we are finding that the questions get all jumbled upon refresh. In a previous version (I think) of either WordPress, LearnPress, or the Random Plugin, we could set to the full question number e.g. 88 out of 88 questions and it worked fine. However, now that is giving an error: “Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /code/wp-content/plugins/learnpress-random-quiz/inc/class-lp-random-quiz-hooks.php on line 138”

    Edit: I just updated to the most current version of LearnPress the while I do not get an error anymore, it randomizes the questions upon refresh each time. While I cannot duplicate the skipped answer, I am inclined to believe this is related.

    This may be part of the problem. Do you know when this became and issue?

    Thanks,

    Joseph

    Plugin Support brianvu-tp

    (@briantp)

    Hi Joseph,

    Thank you for your detailed response and for providing the additional information.

    We’ve been able to confirm the issue you’ve described regarding the LearnPress – Random Quiz add-on, where questions are shuffled upon refresh.

    Since you’re using our premium add-on LearnPress – Random Quiz, we recommend creating a free support ticket on our official support forum.

    To help you further, we recommend that you create a free support ticket with the subject “jgdraper328 – Quiz Losing State Causing Skipped Questions” through our official forum.

    Please visit , click on the “Support” and follow the instructions in this video to create your ticket

    Our support team will be able to assist you with this issue.

    Thank you for your understanding!

    Best regards,
    Brianvu-tp

    Thread Starter adarkerforest

    (@jgdraper328)

    Just wanted to follow up to anyone reading this about the LearnPress plugin. LearnPress said that it was completely normal for the quiz to shuffle questions on every refresh when shuffling all questions, but not when not shuffling less than all questions. Wish I could like this plugin, but I am experiencing too many issues.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Quiz Losing State Causing Skipped Questions’ is closed to new replies.