How do you make it?

May 09, 2013

I would like to know how to create a slide test results, as shown in the attached image.

1 Reply
Ward Scott

I created a similar scenario as a proof-of-concept a couple of weeks ago. It worked great, although it did not have nearly as many items on the results slide. For the purposes of instruction, I will use the West region in my example but you should be able to easily expand upon that to include the other four regions. As with any large project, do this in stages and test heavily. It will make debugging much easier.

  1. Create your variables. You will need the following variables:
    westScore, westCorrect, westIncorrect - These should be numeric values, starting with 0
    AKcorrect, HIcorrect, WAcorrect.... - Obviously creating similar variables for the other 7 states, initialize each to False
  2. Prepare your results slide.
    The scores should be right aligned and you replace the "0" with the variable bracketed with percentage symbols. For example, the correct score for the West region would be the following entered into a text box: Correct = %westCorrect%

    How to handle the check boxes beside the states. If you have not already, I would create 2 or 3 states for each of these boxes: the "Normal" state which is empty, an "Incorrect" state which contains the 'X', and you might consider using a "Correct" state that contains a check mark. Create a meaningful name on the timeline for each of these items. I would use something like: cbAK, cbHI, cbWA.... ("cb" standing for check box.)
  3. Write your code (i.e. Create your triggers)
    On each of the question slides, you need to use triggers to evaluate the response and change variables as necessary. When and how this happens might vary depending on your question slides. Let's assume the questions slide has 4 buttons, one of which is the correct answer, that button would have the following triggers:

    Set AKcorrect equal to True
         When the user clicks
    Add 2.00 to westScore
         When the user clicks

    Please note, I added 2 to the score so there could be a possible 100 points scored. You can obviously use any number you prefer.

    Also, there will be an issue if the westScore variable is displayed on the question slide as the user will be able to see the score increase when they choose the right answer. If that is the case, the score should be evaluated on the next slide when the timeline starts.

    On the results slide, you will not have to do anything with the scores. They should be fine. There is a lot of work to do for the check boxes (cb), however. For each cb, you need to evaluate if the answer was correct and change the state of the cb accordingly. For example, Alaska would look like the following:

    Change state of cbAK - "Rectangle" to Incorrect
         When the timeline starts
         If AKcorrect is equal to True

    Of course, you need an additional trigger/evaluation if you do use check marks for correct answers.
  4. Error Trapping. You could have done everything correctly and the end product may work exactly as you want it to, but that is not likely. What happens if a user repeatedly clicks on a correct button? Does the score then increment up 2, 4, 6, 8 points? These types of logical bugs can be corrected using additional variables as needed. (Of course, your triggers change a bit as well.) This is why you want to create one piece of your project first and then thoroughly test. Once you have all the bugs worked out, then you create the other sections.

I am pretty sure I covered everything you need. Hopefully, it will at least lead you in the right direction.

Ward
  

This discussion is closed. You can start a new discussion or contact Articulate Support.