72 Replies
Gerry Wasiluk

Okay, thanks!

Try this.

1) Create a new variable.  Let's call it varQuestionNumbering.  Make it numeric.  Initial value of 0.

2) On each question slide (or your master slide for questions), add a trigger that fires when the slide begins.  This trigger will adjust the value of varQuestionNumbering by adding 1 to it.

3)  On each slide, add a text box.  Let's say your quiz has 12 slides total.  In the text box add this:  Question %varSlideNumbering% of 12.

4) Right before the quiz (good if you quiz has an intro page), add a slide trigger that fires when the slide begins and sets the value of varQuestionNumbering to 0.

5)  Then, if you are going to let people re-try the quiz at the end from the results page, add a trigger when the slide begins that resets varSlideNumbering to 0.

If I remember right, Steve Flowers had a variation of this that could put in the number of questions in the quiz (here, 12) rather than hard-coding it in the text box.  Steve?

Nancy Woinoski

 I have only tried this with one question pool but I think it should work when using 3 - the trick is that you have to keep one question outside the question and this will always be the first question - the rest of the questions will randomize.

First you have to create two numeric variables.

Call the first one Page and set the initial value to zero

Call the second one PageCount and set the inital value to the number of quiz questions in your test.

One each of your quiz pages - add the following text box in the spot where you want the page number info to display.

Question %Page% of %PageCount%

Now on the very first quiz question (this is the one that sits outside of the question banks)  add a slide trigger that sets the value of the variable Page to 1 as follows:

On the rest of the quiz slides, add a trigger that increments the Page variable by 1 as follows:

I think that is about it - you just have to make sure that first single quiz question is included in your results slide.

Kate Leifheit

This is great! But when I click the "Review Quiz" button the number goes to 31 and stays there because the buttons switch to "back" and "next" and not "submit". Does this mean I have to add a back and next button on every slide and a trigger to each of them? Or is there another way to solve this so that when it goes into "review" mode it will add and subtract one with back and next. I couldn't figure out how to add variables to the back and next buttons during review mode since it is not available on the storyboard.

Thank you!!

Roger Corpas

Hi Kate,

I used a combination of Gerry and Nancy's solution. 

I encountered the same problem you have and solved it this way:

1. Add trigger to "Review Quiz" to reset variable to 0. Since you have your variable set to add +1 at the beginning of the timeline for each slide, the count will be the same as you had before resetting the variable. 

2. At the master slide level add trigger to next button to add +1 and to previous to substract -2. I am seeing a delay in the count but it does adjust itself after a quick moment. 

So far, it seems to work. If someone has a more elegant/efficient solution, I would love to hear it. 

Please let me know if this is not clear. 

Good luck!

Brett Rockwood

I was thinking about this for a bit and thought it should be pretty straightforward and would give it a try. Here's what I did:

  1. Created a number variable called QuestionCount at set the default value to 0.
  2. Added a slide trigger on each question slide that adjust the variable QuestionCount to +Add, Value 1 when the timeline starts
  3. To display the numbering I entered "Question %QuestionCount% of X" where X is the number of questions pulled from the pool on each question slide.
  4. On the results slide I put a trigger on the Review Quiz button to set the variable QuestionCount to 0. This causes the review to restart the numbering again from 1 because when the timeline begins on the review pass of the first question it will automatically be reset to 1 because of step 2 above.

Seems to work properly for me.

Roger Corpas

Yaki...your idea is simple and would work too. I like it.

Brett...I did something like you describe.

My reply was also about what happens when you click the back button while you are reviewing. Let's say...you go to question 1 after selecting the review button...then you go to question 1, 2, 3 but then you want to go back.  

I am not sure if you had this same problem but I could only make it work going back in the way I described.

If you have any thoughts about this, I would be happy to give them a try.

Heinrich Bartie

I share Roger's frustration here. The review section is what seems to throw this concept for a loop. I didnt even consider resetting the variable back to 0 when the review page launches, so that will take care of that issue for me, thanks guys.

The problem I'm sitting with like Roger is when you start using the back button while in review. Because the trigger is based on "when timeline starts" you end up with the question count variable being fired again when you use the back button in the review pages. So you ultimately end up with something that looks like "Question 43 of 30".

I've tried to set the variable to update +1 when the user clicks the next button, and subtract 1 when they click the back button, but this caused even more weird behaviour. I would end up with a situation where the count would not update at all (so it would remain on zero) and would only start incrementing the variable when I reached the last question in storyline preview mode. When you're previewing say 10 questions in a quiz, only once i get to question 10, and then click the next nav button the variable would start incrementing. At this stage in the preview mode there in no next question to go to, so the next button doesnt lead anywhere, but the variable starts increasing! Very strange indeed.

I have not tried this by publishing the quiz properly, so i'm not sure if this might just be a glitch in the preview mode. I will give it a try sometime and let you guys know.

If anyone finds a nice solution, share it please

Kate Leifheit

I experienced the same problem, but then I chose to use the following triggers to the question master slide which fixed it.

Master Slide:

1) Add 1 when user clicks next

2) Subtract 1 when user clicks previous

3) Jump to the previous slide when user clicks previous

On the normal slide view for my one question that is outside the quizbank:

1) Add 1 when user clicks submit

And then on the "Review" button, there is a trigger to equal 1 when clicked.

Let me know if it works for you as well!

Thanks, Kate

Roger Corpas

Hi Kate,

You nailed it!!!. I knew there was a better solution than mine....

I think what I am doing is still a bit different.

1. I do not have any slides outside of the bank. I set the variable to 1 in the instructions. I show the instructions each time a learner wants to retry the quiz.

Just on the side...I am thinking that it might also be possible to set the variable to 1 in the first question, regardless of the question chosen from the pool. The trigger could be set to add +1 to question count variable when timeline starts if this same variable is 0. 

2. Given than I am provinding feedback on each question, I added the trigger to the "Continue" button in the feedback master, instead of the submit button.

These are just minor differences...the result is the same.

Thank you again for your help finding a simpler and more elegant solution to this problem.

Roger

Yaki Gordon

Here is how i set it finally.

1. In Slide Master> Question layout

-Add "Question %varQuestionNo% of X

-Add trigger "Add 1 to varQuestionNo when timeline starts"

-Add trigger "Subtract 1 from varQuestionNo when user click Previous button If varQuestionNo greater than 1" (otherwise the number will keep going down to 0 and -)

2. In Results slide

- Add trigger"set varQuestionNo equal to 0 when user click" for both the Retry and Review buttons

William Barkhaus

Thank you all for the great information.  I did do one thing slightly different than Nancy's suggestion which allowed me to not have to use any questions outside of using the Test Bank.  (Just to clarify, my setup is similar to Roger's in that I show the user the instructions before the quiz.)

I simply used a slide trigger to set my initial Page variable to "0" in the top Slide Master layout (for the instructions section).   Then in the lower Slide Master layout (for the Quiz Bank section), I used a slide trigger to set the Page variable to increase by "1".  That way, every question in the quiz bank automatically increased the value by "1" and I didn't have to always use the same initial question.

Heinrich Bartie

Just a follow up on this from my end.

This was a feature that was built into Quizmaker 09. If memory servers, it was a single checkbox you would select to have the question count shown during the quiz.

Why has, or can, this not be added to Storyline? It is clearly a much needed feature by the community of Storyline users, and instead of coming up with all sorts of weird and wonderful ways of getting this to work, shouldn't this be a simple feature in the quiz component of Storyline?

Just point me to the right area and I will go log a feature request with pleasure.

Ed Crane

I was able to make this work well, but then...

During UAT, a user found that a slide read "Slide 36 of 35". The 35 is hard-coded in a text box. I have the variable set up on the Question slide master to increase the variable by one at the beginning of the timeline for each slide.

I'm wondering if has something to do with the resume feature ...if the user exits the course without completing it, when they relaunch they are prompted to resume where they left off. Would this potentially mess with the variable value?

Any suggestions?