JS for randomizing tiered quiz questions?

Alright noble edge users out there - I could really use your help:
I am creating a quiz in edge with 10 levels - each level asks a question dealing with a particular topic for that level.  To make it more challenging/random, I want to allow each level's question to pull from a pool of 2-3 possible questions for that particular level (rather than one general pool for all 10 questions).
I have created symbols out of each question - and played with a few randomizing options - but I am a tragically front-end designer
Any help is greatly appreciate!

A lot of that depends on how you've structured your game. Hopefully someone can add to this, but If you're wanting to stick mostly to coding from the timeline in edge animate, then you could do something like this:
1) Insert a timeline label at the location of each question.
2) Insert a timeline trigger at the beginning of your animation to create global array that contains the names of each timeline label for your questions. Something like this:
     window.possible_questions = ["Timeline Label 1","Timeline Label 1","Timeline Label 1","Timeline Label 1"];
3) After you create the possibleQuestions array you can then send the user to the first random question by generating a random array index within the range of the remaining questions using something like this:
     //generate random index
     var random_index = Math.floor(Math.random() * possible_questions.length);
     //store the next question label
     var next_question = possible_questions[random_index];
     //remove the label from the array so we don't come back to it again
     possible_questions.splice(random_index, 1);
     //send the player to that label
     sym.stop(next_question);
4) At each question, put something like this. If you want to detect the end of the game you can do that as well:
     if(possible_questions.length == 0){
          //game is done
          sym.stop("End of Game Timeline Label");
     }else{
          //we have more questions to ask
          //generate random index
          var random_index = Math.floor(Math.random() * possible_questions.length);
          //store the next question label
          var next_question = possible_questions[random_index];
          //remove the label from the array so we don't come back to it again
          possible_questions.splice(random_index, 1);
          //send the player to that label
          sym.stop(next_question);

Similar Messages

  • Adobe Captivate 8 system variable "cpQuizInfoAnswerChoice" is empty for random multiple-choice questions.

    Does anyone run into this problem when capturing the user answer for a random question slide? Adobe Captivate 8 system variable "cpQuizInfoAnswerChoice" is empty for random multiple-choice questions.

    Hi Shriyansh.
    The reason I am interested in capturing the user answers in Submit All situation is that I know after I published the test using SCORM 2004, all the user responses were captured in "cmi.suspend_data" because my test can resume the test to the last exit question in the middle. However, when I looked at the suspend data value, I have a hard time to understand the pattern and pick out the meaningful user question responses data. I really need help from you to understand how the suspend data value was constructed and how to parse this data. Another area I thought it's easy to get the user question responses data is the interaction records, but I always got only one question (the last randomly sampled question) interaction record. See the following generated XML SCORM 2004 4th edition data. Could you help me figure out how to interpret the following suspend data to get the users responses to each test question?  And why I only got one question interaction record? Thanks again for your help, Zhuoran.
    <ArrayOfKeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.success_status</Key>
      <Value>failed</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.completion_status</Key>
      <Value>completed</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.exit</Key>
      <Value>suspend</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.mode</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.suspend_data</Key>
      <Value>M1A%24nP1A%24nP1FPool1B1FPool2A1FPool3A1FPool4B1FPool5B1FPool6B1FPool7A1FPool8B1FP ool9A1GPool10A1A%24nP000BB0100C11KCA%7E%24nU*9aAlO%7E%24nU*3eOlO1000B00AEAH0%3B1%3B2%3B3BA B0B0BBB0B0BCB0B1BDB1B0DB%7E%24nU*-EBlO%7E%24nU*YoOlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BBB0B1BC B0B0BDB1B0EC%7E%24nU*flBlO%7E%24nU*IyOlO1010B00KEAH0%3B1%3B2%3B3BAB0B0BBB0B0BCB0B0BDB1B1FD %7E%24nU*nWMlO%7E%24nU*kRPlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BBB0B1BCB0B0BDB1B0GE%7E%24nU*kRP lO%7E%24nU*arPlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BBB0B0BCB0B1BDB1B0HF%7E%24nU*arPlO%7E%24nU*c HQlO1000B00AEAH0%3B1%3B2%3B3BAB0B1BBB0B0BCB0B0BDB1B0IG%7E%24nU*cHQlO%7E%24nU*kfQlO1010B00K EAH0%3B1%3B2%3B3BAB0B0BBB0B0BCB0B0BDB1B1JH%7E%24nU*kfQlO%7E%24nU*74QlO1010B00KEAH0%3B1%3B2 %3B3BAB0B0BBB0B0BCB0B0BDB1B1KI%7E%24nU*74QlO%7E%24nU*IYRlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BB B0B1BCB0B0BDB1B0LJ%7E%24nU*IYRlO%7E%24nU*aHSlO1000B00AEAH0%3B1%3B2%3B3BAB0B0BBB0B0BCB0B1BD B1B00PNvar_ToggleTOCBAPvar_ToggleAudioBAEv_S1BAEv_S2BAEv_S3BAEv_S4BASv_completionStatusBAP v_successStatusBAKv_locationBAFv_scoADls3NreturnMessageBAHv_scoreBAOv_scorePercentBAPv_cur rentChoiceBAPv_stringChoicesBA</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.entry</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.location</Key>
      <Value>Posttest%20Results</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.launch_data</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.learner_name</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions._count</Key>
      <Value />
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.id</Key>
      <Value>LSQ19C</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.type</Key>
      <Value>choice</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.learner_response</Key>
      <Value>The_vehicle_is_under_warranty_for_the_life_of_the_lease</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.result</Key>
      <Value>incorrect</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.correct_responses.0.pattern</Key>
      <Value>Genuine_Subaru_Accessories_can_be_residualized_as_a_part_of_the_lease</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.description</Key>
      <Value>What is one feature of a Subaru Motors Finance lease?</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.weighting</Key>
      <Value>10</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.latency</Key>
      <Value>PT3S</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.objectives.0.id</Key>
      <Value>Quiz_2014924125021</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.interactions.0.timestamp</Key>
      <Value>2014-11-20T13:02:01.0-06</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.score.raw</Key>
      <Value>30</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.score.max</Key>
      <Value>100</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.score.min</Key>
      <Value>0</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.score.scaled</Key>
      <Value>0.3</Value>
      </KeyValueOfstringstring>
      <KeyValueOfstringstring>
      <Key>cmi.session_time</Key>
      <Value>PT31.99S</Value>
      </KeyValueOfstringstring>
    </ArrayOfKeyValueOfstringstring>

  • Lightbox using smartshape in Quiz question

    Hi,
    I'm using one question/quiz slide and would like to create a lightbox to display different comments depending on what choice the user selects.
    In the comment lightbox, I hope to allow the user to click a X image to close the lightbox.  
    The exisiting message boxes do not give the client a look they desire. Are there any other suggestions on alternative message boxes that overlay over the the quiz question?
    Please advise.
    Thank you!
    Susanne

    You could use grouped objects that include Smart Shape buttons for the click to close the lightbox.
    But you need to be aware that the ON Success or On Last Attempt events only fire in Quiz Questions AFTER the Submit button has been clicked and any feedback captions have appeared and been dismissed.  If you want your lightbox captions to appear after the submit button is clicked, you'll need to turn off the other feedback captions.
    As far as having a different lightbox appear depending on which answer the user chooses, that's really only available for Multi-Choice quiz questions, no others (and not even multiple answer questions).  You need to use the Advanced Answer option event to trigger the appearance of the lightbox.

  • Random branching for quiz questions

    I have a quiz that has ten questions. I want participants to
    answer all ten questions but not in any specific order. Is there a
    setting for random branching within a quiz?

    I've uploaded our solution to the random quiz in captivate to
    the exchange. It doesnt randomize within a quiz, but it randomizes
    quizzes from a pool of quizzes, which can have a similar effect.
    This is a javascript patch to the HTML wrapper generated by
    Captivate:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1282 018
    Ellen
    http://thedesignspace.net

  • Reporting Interaction ID from Random Quiz Questions

    I have a Captivate 5 project that includes a Question Pool of 30 questions and I need to only show 10 random questions to a user (all multiple choice).  I have this all set up and each question in the question pool has a unique SCORM Interaction ID.  Project is published to use SCORM 2004 and set to report answers and interactions to the LMS.
    When running the couse in the LMS the only interaction ID being saved is for the first question that is displayed from the pool.  No interaction data is being saved for the other 9 questions.  Final score is also saving OK.
    How do I get Interaction data for each random question?
    Thanks for anyone's help!!!

    Here is an example of what is happening on my random question slides:
    Here you see the roll-over boxes showing on the quiz screen (Static Head box, Stoker box, Muffler Box)
    Anyone have any idea as to why this may be happening?

  • Randomized Quiz Questions in CP7: Back button goes forward

    I've checked my on enter and on exit fields. Not sure why, but my randomized quiz questions' back buttons go forward. Very odd. Is there a setting I should check?
    It is worth noting that the back button is clearly not the forward button... checked in properties.
    Also, I need the student to be able to reanswer this question until they get it right, at which time the question stays answered.

    Yes sir. Thanks for the reply, Rod. I was hoping you were on =)
    I buy pretty much all of your stuff... went through the whole troubleshooting guide.
    Just noticed that "Branch Aware" is on, and it is a linear lesson. Going to try turning that off.

  • Audio on last slide after quiz questions not playing

    Captivate v5.5
    I have a project with a question pool and a series of random questions
    The random question slides are without audio.
    After finishing the question pool the project closes with the final slide which does have some audio - which runs fine when I test the slide.
    However when I test the whole project (F12) the audio on the last slide does not play.
    The audio on the slides prior to the random question slides plays without any problem.
    Any ideas please?
    Noel

    Anjaneai,
    Thanks for the suggestion. But changing the question setting to infinite attempts will just allow the user to retry each question over and over until they get it correct. I want to give them one chance to answer each question for the entire quiz. Then, if they don't pass, they can try the entire quiz again.
    I ended up finding a resolution, though. Based on one of the suggestions from this blog, I just shortened my slide time for each question to .5 sec (it was originally 3 sec). That seemed to do the trick!
    http://blog.icslearninggroup.com/2011/12/adobe-captivate-quirks.html
    Kristin

  • Randomization of Order of Answers to Quiz Questions

    When randomizing answers to multiple-choice, and multiple-answer, questions, is there a way to lock one of the answers in place? 
    For example, I would like to have the order of (a) through (d) shuffle, but keep answer (e) as "None of the Above".  [Using Presenter 9, MS Office PowerPoint 2013, Windows 7]

    Although I have a very limited experience with Captivate and with Presenter I am not sure whether this suggestion will work.  Can you split up your A-D questions separate from the E question and thus only shuffle A-D in a script?  For example, if I were coding this in Flash (ActionScript 3.0) I would create two separate arrays, one for the A-D questions and one for the E questions/answers and perform the necessary logic against those two distinct arrays.  That way you can always keep your second array consistently appearing in the same place in your quiz.

  • Is there a way I can randomize quiz questions in Adobe Captivate 6 on multiple attempts?

    I am trying to find a way in Captivate 6 to randomize quiz questions out of a pool (i.e.; 50 random questions slides are linked to a pool containing 63 questions, I want to allow for 3 attempts).  Things work great witht he first attempt, but Captivate 6 is not generating new questions when I click the Retake Quiz button after failing the first attempt.  Captivate 6 simply gives the exact same 50 questions as the first attempt in the exact same order.  Is there any way around this issue in Captivate 6?  Thank you in advance for any suggestions you have!

    Rod, just thinking out loud, and maybe this is too complex...
    Could (generic) you insert multiple random-question-slides and then control which slide is viewed based on how many quiz attemps have been made?
    That is..
    Slide 1 - question 1a
    Slide 2 - question 1b
    Slide 3 - question 1c
    On first attempt, go to slide 1, skip slide 2 and 3.  On second attempt, skip slide 1, go to slide 2, skip slide 3.  On third attempt, skip slides 1 and 2, go to slide 3.
    Could you use the cpQuizInfoAttempts variable to control the slide order with an advanced action?

  • Backwards Navigation When Reviewing Quiz Questions

    I have discovered from some students that they can cheat on my quiz. They take the quiz, review their answers and make note of the correct answers, then either drag the navigation slider backwards or click the Back button to return to the beginning of the quiz. This resets their original answers and allows them to retake the quiz with the answers they took from their notes.
    The quiz is set up to allow multiple attempts, but I assume they should be starting over with each attempt. My quiz questions are randomized from a test pool, so hopefully they do not see the same questions again and not in the same order. However, by cheating in this way, they can take the same questions in the same order.
    Is there anyway to limit backwards movement when reviewing the quiz?
    I have turned off backwards movement while they are taking the quiz, but this setting is turned off when they start reviewing the quiz.
    I am using Captivate 5.

    Thanks for the information. Yes I have set the quiz up to allow users to review their answers. Yes I assume they will take notes on the answers, but I have not enabled the Retake Quiz button. Once they get to the results page and choose to review their answers, I assumed (incorrectly) that their answers would be locked and they would not be able to change the answers or results for their attempt.
    My instructions tell them to relaunch the training, go through it again, and then take the quiz again. With the questions and answers being randomized, I was hoping that their notes (question 1 answer is B - question 2 answer is C - etc.) would not be very helpful to them and they would put effort into taking notes from the training to help them on the test instead.
    You said the following:
    "If a user clicks the Review Quiz button after any attempt, they will be unable to perform a new attempt on that quiz until they relaunch the lesson again.  Also, if the user jumps outside the Quiz Scope by navigating back to any slide before the first scored object or quiz question, they will be unable to reattempt the quiz until relaunch."
    I have tested this out, launching the training from the LMS, and it is not correct. I can go through the quiz, review my results, drag the slider or click the back button to the beginning of the quiz, and take the quiz again.
    I have disabled backwards movement during the quiz, but once you start reviewing a quiz, backwards movement is once again enabled via the slider or back button.
    I can hide the playbar and navigation controls, but when you get to the review, the navigation controls remain hidden and you cannot advance through the questions to see the results. I thought of adding a separate Forward button on the quiz question slides to allow the user to go forward as they review the slides, but you cannot add buttons or clickboxes to question slides.
    I could certainly turn off the review functionality, but I think it is valuable information to the student. I need to allow them to retake the quiz, as my boss has set a very high bar (100% passing score) on the quiz.
    Does anyone have any other ideas?
    By the way, after typing up this response, I started doing some playing around, and I figured out a fix. I turn off the navigation controls before the quiz and enable the Skip button on each question slide. With the navigation off, the user can answer the questions and click Submit. Then when reviewing the answers, they can navigate forward by clicking Skip. They can no longer navigate backwards through the quiz and training material.

  • Importing Quiz Questions

    I'm trying to find a way to reuse some questions in my course for inclusion in a Final Quiz, without having to reinput all of the questions.
    I made a copy of my course and imported the questions I wanted for my Final Quiz. I didn't think I could use these, as they had the same interaction ID as the questions in my course. Is there a way around having to reinput questions from my course I want to include in a Final Quiz without retyping all and have my scoring work property when reporting to LMS?
    Thanks very much.
    Susan

    Yes, you can change them, just make sure they are unique within the quiz. They are auto generated to keep them from being repeated.
    Usually I've seen the quiz import tool create new unique interaction id's for questions. The only time I have seen the interaction ID repeated is if you use the copy/paste function to recreate the quiz slides. However, it has been a while since I used the import quiz tool.
    The cat-on-keyboard method is one trick I have seen used to keep the id's random.

  • Aggregator seems to randomize quize questions from various project files

    I am using Captivate 5.5.
    I created 10 quizzes, each in its own captivate project.  Each project has its own quiz ID and the question slides are randomized using one pool.   'when I publish each captivate project file, the quzi (swf file) the questions are fine.   
    However, when I aggregate all 10 files into an aggregate project, I get quiz questions from different project files...and the title slide doesn't even match the master slide for that quiz!  For example, after aggregating the project file, my Ch 2 quiz would contain question slides from various chapters...and the
    the title slide doesn't even match the chapter for that question.

    When you use Question Pools, the SWF files for the pools are external to the SWF.  The filenames for the question pools are taken from whatever you called the pool, with the letters _CQP on the end.
    When you use Aggregator, all of the SWF files for each aggregated project file are placed in the same folder.  Each project is not kept isolated in it's own folder.
    So if any of your question pools happen to have the same name, they may overwrite one another when Aggregator compiles them into the same folder.
    Go back into your projects and make sure you first give each published project file a unique name.  Then append the name of each question pool with some extra letters that differentiate it from a similar pool in any of the other projects.  Then republish everything again and build another Aggregated version from scratch.  See if that resolves the issue.

  • Captivate 6 - Published - PDF does not play quiz questions

    I just published my captivate 6 presentation.  I am launching the .pdf file to view.  At the end, the quiz questions do not work.  I get a white screen and not my questions.  Any ideas?  Thanks

    Below is a screen shot of the published settings.  The whole training presentation plays as expected.  Then when it gets to the quiz questions I get a white screen and nothing happens. 
    After I publish, I go to the zip file and run the pdf version. 
    This is for someone to view the training outside of our LMS system.
    Here are the preferences ....

  • Stuck in course before quiz question

    Hi. I have a course where users get to a quiz question, then after going backwards to review content prior to that quiz question, then upon trying to go forward again, gets stuck on the content slide right before that quiz question and can never move forward again.
    Quiz is set to Answer All, allow backward movement
    Course is locked for every slide, Advnace by user

    Hi,
    Please check the number of attempts you have allowed per question, if the attempt set per question is one, the slide would get locked and would not allow any further attempts to be made
    Please check the attempts for each question, modify it with number that you would like to allow.
    Thanks,
    Anjaneai

  • Quiz questions will not retain format when question is changed.

    OK forum folks. I'm working on my first e-learning project and have ran into a problem with question formating. The instructions/help basically tell you to click here and click there. I can easily figure that out. The questions I seem to have are quite a bit deeper.
    I have a predefined template which is company approved. I have created master slides in the question pool for both a 4 item match and a 5 item match (I have found if I add a line to the 4 matching line quiz the line spacing and formatting changes). The placeholder questions are essentially non-questions.
    I duplicate the master slide in the question pool to maintain the original format (spacing, location, etc.).
    I change the placeholder questions on the duplicated slide to the real question (slide is still in the slide pool)
    The formatting (font, spacing, locations, etc.) change on the new (edited) questions and require reformatting.I have also tried copying the master question slide to the filmstrip and editing the copied slide questions in the filmstrip. I receive the same results.
    Is there are way I can create masters in the current format so I can use the approved templates, edit the questions and not have to reformat the slide after the questions have been changed?
    Also, is there a way to lock the formatting of the questions? If I want to add/delete a new question or line to the slide, it would be great to be able to not have to reformat the slide for the change.
    I look forward to your answers.
    Thank you.

    I am trying to deal with the same issue. The master slides are more about background elements and navigation buttons, but they do not seem to allow for the addition of quiz elements.
    I have come up with a workaround that I hope will work. What I am doing is creating a new project that becomes my quiz question layout library (Let's call this Project 2). In this project I add the various types of questions I will be using in my project (multiple choice with three choices, multiple choice with five, true/false, etc...). I get all the quiz elements in place for each type of question (the header, question, submit/clear buttons, review area, etc...).
    These slides serve as my Master slides for my actual project (Project 1). I can copy and paste the appropriate layout from Project 2 to Project 1 and then change the questions themselves.
    I am sure I will find out the downside of this soon enough...
    There is no doubt the creation of masters for quiz questions needs work, actually it needs just to exist!

Maybe you are looking for

  • Problem sending to Comcast email

    I am having a problem sending an email to anyone who is using comcast.net email.  This is something that just started about 3 weeks ago. I have a web site, if I send an email with the web site listed anywhere in the email, www.beaumontfamilyhistory.c

  • Where do I find Applescript studio download at

    I cant seem to find a download sight for Applescript Studio does any body know of a sight where I can download it?

  • Import photos from bluetooth phone

    Is there any easy way to import photos from a bluetooth phone directly into iPhoto? My wife has a motorola razor flip phone with camera PowerBook 12inch G4 with iphoto '05 To get the photos into iPhoto now, I do the following: 1) Under Bluetooth menu

  • Java source code to compare XML based on ExamXML XML diff tool

    I’m working on a project that includes comparing XML files and I need a source code on Java to compare XML fragments. I’m using ExamXML from http://www.a7soft.com to compare XML files but I need the Java source code. Can anybody help me.

  • Chinese language isntallation in ECC system

    Hi, How can i install Chinese langage in ECC system. Regards Siva