Test Settings

acullers-4018 Community Member Posts: 1
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)?


  • wheels
    wheels Florida USACommunity Member, Administrator, Moderator, Rockstar Manager Posts: 665 eLearning ROCKSTAR Admin Team
    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.
  • ldeb-6542
    ldeb-6542 Community Member Posts: 1
    I get a question about test settings. I created 3 Lectora tests. When i get my score, I get my test score and if it I failed or passed. I would add an object to my score. If I get 75% or more, I would like to add a picture. If I get less than 75%, I would like to add an other picture. My tests are set as 75% lower score to pass.

    But when I try my test, it's always my failed picture which appears. Even if my score is 100% or 75%. Could you tell me how it's working ? Thanks !
  • timk
    timk Community Member Posts: 1,236 ✭ Legend ✭
    I can't find a problem, the settings should be correct. Only the trigger "Affichage de la page" may come to early. You might try to move the action from the image to page level and trigger it "On: Show" ("Afficher").

    By the way: For a test score you can also use conditions like: "If Test_1_Score Is Not Passed" (or Is Passed) which liberates you from changing the value in case you change the pass rate for the test.