Skip to main content
Inspiring
November 28, 2024
Answered

Quiz refresh on multiple quiz after some slides

  • November 28, 2024
  • 2 replies
  • 440 views

Here's a more polished version of your query:


Hi,

I’m facing some issues with my eLearning module and need assistance resolving them:

  1. Quiz Refresh Issue:

    • The module has multiple quizzes appearing after every 5 slides. If a user navigates back using the back button, the quiz does not refresh. However, the quiz refreshes if the user clicks the "Retake Quiz" option on the results page. How can I ensure the quiz refreshes correctly when using the back button?
  2. Quiz Attempts Issue:

    • Each question allows 2 attempts, but after failing on the first attempt, the quiz answers are not refreshing for the second attempt. How can I ensure answers refresh properly after each attempt?
  3. Progress Bar Issue:

    • I’ve disabled the draggable progress bar using Paul Wilson’s JavaScript tutorial. While the drag functionality is disabled, clicking on the progress bar pauses the module. How can I prevent this behavior?

I’d appreciate your guidance on these issues.

Thank you!

 

    This topic has been closed for replies.
    Correct answer Hussain Raza , Tahira

    // Lock the playbar slider and disable its interaction
    var sliderThumb = document.getElementsByClassName('playbarSliderThumb')[0];
    if (sliderThumb) {
    sliderThumb.style.pointerEvents = 'none'; // Disable pointer events on the slider
    sliderThumb.style.cursor = 'not-allowed'; // Change the cursor to indicate it's locked
    sliderThumb.style.display = 'none'; // Hide the slider thumb
    }

    // Prevent clicking the playbar to pause the video
    var playbar = document.getElementById('playbar');
    if (playbar) {
    playbar.style.pointerEvents = 'none'; // Disable all clicks on the playbar
    playbar.style.cursor = 'not-allowed'; // Indicate that interaction is not allowed
    }

    // Optional: Add further customization if needed, such as restoring pointerEvents dynamically

     

    I have resolved the locked progressbar issue where clicking the playbar caused the module to pause. I used the code mentioned above.

    2 replies

    RodWard
    Community Expert
    Community Expert
    November 28, 2024

    I am assuming you are talking about Captivate 2019:

     

    1. If you want to reset the quiz, the only way provided in Captivate 2019 is to either have the user click the Retake Quiz button on the Quiz Results slide or else relaunch the entire module.  This is simply the way the app is designed to work.

     

    2.  You can enable the Clear button for each quiz slide by selecting that option in Quiz tab.  I would also suggest you selec tthe Retry Message option so that your user gets told they have another attempt.  Even without the Clear button, after their first attempt your user should still be able to select a different answer.  But adding the Clear button gives them both options.

     

    3. To disable the pausing would require even more JavaScript.  Sorry.

    Hussain Raza , TahiraAuthorCorrect answer
    Inspiring
    December 5, 2024

    // Lock the playbar slider and disable its interaction
    var sliderThumb = document.getElementsByClassName('playbarSliderThumb')[0];
    if (sliderThumb) {
    sliderThumb.style.pointerEvents = 'none'; // Disable pointer events on the slider
    sliderThumb.style.cursor = 'not-allowed'; // Change the cursor to indicate it's locked
    sliderThumb.style.display = 'none'; // Hide the slider thumb
    }

    // Prevent clicking the playbar to pause the video
    var playbar = document.getElementById('playbar');
    if (playbar) {
    playbar.style.pointerEvents = 'none'; // Disable all clicks on the playbar
    playbar.style.cursor = 'not-allowed'; // Indicate that interaction is not allowed
    }

    // Optional: Add further customization if needed, such as restoring pointerEvents dynamically

     

    I have resolved the locked progressbar issue where clicking the playbar caused the module to pause. I used the code mentioned above.

    Inspiring
    November 28, 2024

    @Lilybiri @RodWard @Paul Wilson CTDP 

    please help me in the above issues

    RodWard
    Community Expert
    Community Expert
    November 28, 2024

    Our beloved Lilybiri passed away earlier this year.

    She is unable to answer any further questions.