Follow

What are variables?

The definition of variable, according to Google is, "an element, feature, or factor that is liable to vary or change." This makes sense, but what does it really mean in terms of e-learning?

It helps to think of variables as empty clipboards—a place for holding information. The information can change based on the learner's input, or how they interact with the course.

For example:

 

 

Imagine Tim has started a new job at a restaurant. In addition to his practical training he must complete e-learning. The course prompts Tim to choose his role at the restaurant from a list. The user's selection is our variable—in this case the value equals "dishwasher". For another user it might equal "manager" or "server" because the value is dynamic.

The course can now use this information to tailor the content the user experiences so that it is specific to his role as a dishwasher.

How do I use variables?

Now that we know what variables are, we can begin to understand how we may use them.

There are countless ways in which one can use variables in their e-learning. The possibilities are typically limited only by your imagination, needs or, in some cases, your JavaScript skills—depending on the complexity of your needs.

In the example above we customized the e-learning based on the learner's role as a dishwasher. Again, how we customize the e-learning will depend on our needs, but for the sake of this example let's say that on some of our pages we have tips for each role within the company that we only want to be visible to the corresponding role (ex: dishwashers can only see dishwasher tips and not the tips of other roles and vice versa).

Here is an example of one way we may choose to accomplish this:

  1. On one of the first pages of the course ask the learner to select their role from the buttons below.
  2. Below the question, insert a button: Insert tab>Buttons.
  3. From the Button Properties right-panel, label the first button: Dishwasher.
  4. Click the Actions button.
  5. Select Set Variable from the list of Action Types. The Element Interactions panel will open.
  6. Set the Trigger to: When clicked, and name the variable: Dishwasher.
  7. Under Type, select: True/False (Boolean), and set the Value to True.
  8. Click Apply.

Repeat this process to create buttons for the roles of Server and Manager.

You've now created the three custom variables needed to show your learner-specific tips on all subsequent pages.

How to use these variables to show the correct tips:

  1. Create your tips as separate text elements on your subsequent pages. One text element for the dishwasher's tip, another for the server's tip, and a third for the manager's tip. Insert tab>Text.
  2. Select the dishwasher's tip, go to the Animate tab and select Timing.
  3. Click Show Elements. The Page Action Timings right-panel will open.
  4. Change the Trigger to When Variable Is and choose the variable Dishwasher that you created earlier.
  5. Ensure that "Set Hidden On Load for targets" is checked.
  6. Click Apply.
  7. Click Done.
    Note: Single page Preview will not work for variables because the action may be depended upon other actions that have yet to take place. Please use Full Course Preview for variables: View tab>Full Course.

Repeat this process to create page timings for your server and manager tips.

When complete, you can preview your course as each of the different roles.

For more discussion on how to use variables, check out community post: Variables - a quick overview.

 

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Erin Steller

    I was glad to read that this is possible, but it would be helpful to know HOW to go about it.

  • Avatar
    Shea Hickey

    Hello Erin! Thank you for taking the time to comment on this article.

    With your suggestion in mind, we've updated this article to include a "How do I use variables?" section. I hope you find the addition helpful.

    For more information, please search our other articles and community posts on variables.