Wednesday, February 9, 2011

Lectora – Using Variables to Restrict the Next Button

By Dean Hawkinson

Here’s the scenario: You are designing an eLearning course in Lectora, and you have a page with multiple buttons. These buttons launch required information (i.e., simulations, websites, PDF documents, videos) and it does not matter in what order the learner clicks the buttons. However, you want to restrict learners from clicking the Next button until they review each item. In this case, there is a way to create a variable to restrict the Next button until they click all items on the page.

If you would like an introduction to using variables in Lectora, click here. In this earlier post on using variables, Jay shows how to disinherit the Next button and then add a new one when the selected conditions are met. Alternatively, you can also simply hide your Next button as soon as the page displays and then show it again only when the conditions are met. For this post, we will focus specifically on the latter method.

There are actually several ways to restrict the Next button using variables on Lectora. You can set up a single variable as outlined in this post, or you can use one variable for each click action on the page. Another way to restrict the Next button without using variables is to simply use an action on the page to hide the button, and then select the last button to show the Next button upon clicking it. However, using the action on only the last button does not require the user to click the others – as long as the user clicks the last one, the Next button appears. With this method, there is no way to ensure the user has clicked ALL of the buttons on the page.

So, how do you ensure the learner clicks all buttons to launch the required information?

Use a variable.

Setting up a variable for this situation is pretty simple. First, make sure that you have a “Hide Next” action on the page. Then, create the variables.

Let’s say you have a page that launches three simulations that are required. For each simulation, you need to set up a separate variable.

--1-- Set up a variable for each simulation and title each one something simple that you will be able to identify easily, such as “Simx_complete” (replacing x with the simulation number) or something similar. Set the initial value at “0” and save each one. Select Retain Value between sessions if that applies.

--2-- For each button, you need two actions – one to show the Next button and another to modify the variable. I usually title them simply “Show Next” and “Modify Variable” so I don’t get confused when I have to maintain the course later. On the General tab, set your actions according to the image below.

--3-- Set your value for “All of the Following” and then set the variable equal to “1” for each of the “Simx_complete” variables (selected from the drop-down menus), other than the one you are currently setting.

For this example, you are setting the properties for simulation 1, so you set the values for the other two simulations (2 and 3) “Equal To” “1” so the Next button will not show when you click the Sim1 button until after the learner clicks the other two as well. When you set each button with these actions, the Next button will not appear until you have clicked all three buttons to launch the simulations, and the order in which they are clicked does not matter.

That’s all there is to it!

Using variables will ensure that learners launch ALL required information before they can proceed to the next page.

What else do you want to know about Lectora? Please ask your questions or share your tips in the comments!

1 comment:

  1. What needs to be done if the sequence of buttons clicked matters as a test?


Thank you for your comments.