Help with using a gameboard template choose the questions and ensure the learner answers all questions.

Feb 12, 2021


I'm coming here for help with a template I want to use created by Nicole Legault. Here is the link to the template.

I have spent more time than I would like to admit to figure out how to make it to where I can use this template, but only use 10 questions, and ensure that the learner answers all 10 (or 7) questions and not have them repeat, then include a results page. 

I have a basic understanding of variables, but everything I've tried does not work. Can anyone offer their guidance?

1 Reply
Erin Flage

I believe in the original example, there were 20 questions, one for each spot on the game board.  Which means that obviously not all questions would be answered, but makes it easy because each spot on the board is linked to a question.

If you wanted to have less questions than spots on the board, you have to have a way to select your question. The way I've done this in the past is with a little javascript help.

Create a text variable that is a list of numbers: "1,2,3,4,5,6...", how ever many questions you want to have.  Also create a blank variable to hold the selected question.

The set up  triggers to show the question corresponding to the selected question variable. i.e. Show slide "Question 1" when "selectedQuestion" = 1

Here's the javascript you need:

var player = GetPlayer();

var num = player.GetVar("numbers").split(","); //Get your list, convert it to an array

num.sort ( () => .5 - Math.random() );  //shuffle the numbers

player.SetVar("selectedQuestion", num.pop()); //return the last number of the list

player.SetVar("numbers",num.toString()); //Update your list of available questions