Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #428675 Score: 0
    Profile photo of Andrea Cullers
    Andrea Cullers
    curious george

    I’m developing an e-learning that has several modules and 3 quizzes per module. Of the three quizzes, learners only have to pass 1 to go on to the next module. I’ve added a variable to pick the quiz at random so all learners won’t receive the same quiz.

    Here’s where I’m lost… learners are prompted to take another quiz if they fail the first one, but if the learner fails the second quiz, I want them to have to complete the module again before going on to the third quiz. How can I set that?

    To add another layer… if the learner fails module 1 quiz 1, he/she is prompted to take module 1 quiz 2. Can I add a variable so that, not only will the learner have to retake module 1, but will only receive module 1 quiz 3 (because quiz 1 and quiz 2 were already attempted)?

    #429669 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    friend finder
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    picture perfect
    53 pts

    Message from @carlfink :

    So you create 3 Lectora test objects. (They aren’t technically “objects” in the sense of OO programming, but let that go.) Say you name them test1, test2, and test3.

    When the student reaches the “take a test” page, you can create OnShow actions that check the values for test1_score, test2_score, and test3_score. You’d need an action sequence to calculate the number of tests taken by incrementing a variable, e. g. in pseudocode: “if test1 is nonzero, tests_taken = tests_taken + 1” and the same for tests 2 and 3.

    Now an action says, “If tests_taken = 2, force the user back to the beginning to retake the educational portion.” Another says, “if tests_taken = 3, the user has failed” and jumps to a page that handles failures.

    Then another action after the calculation actions can pick a random test. Due to the limitations of the “variables with random initial values” feature of Lectora (there’s no convenient way to re-randomize the variable after the module initializes), I’d use a hidden text field, with an action OnPageShow to “Set Text >> RAND(1,3)” which sets its contents to an integer: 1, 2, or 3.

    Since OnPageShow actions happen before the OnShow actions for the objects on the page, that should happen first. Now, determine if that test was already given, with a simple, “if the value is 1, AND test1_score is nonzero, THEN randomize again” and the same for 2 and 3.

    Then you use a series of actions that say “If the contents of the field are 1 AND test1_score is nonzero, go to test 1. If the contents are 2 AND ….”.

    Note that for this to work reliably, each test has to set its own score to some nonzero value as soon as the user reaches its first page. That can be as simple as on OnShow action setting testn_score to 1. When the test is scored, that will override the value of 1 with the score actually earned, but it would never go back to zero.

    I haven’t built the module, but that should give you a skeleton of how to do it.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.