In SmartTutor 360, a variable stores information in a project. This article introduces and explains variables in SmartTutor 360, the different types of variables, inserting, naming, and using variables.
Variables are also a great way to add conditional interactivity to courses (view Working with Actions). And the good news is you don’t have to know anything about coding!
What are variables
Like all programming languages, SmartTutor 360 uses variables to store values. You can use variables while designing interactions, displaying a learner’s name on a certificate, or even using them to calculate assessment scores. In other words, you can use variables to track a learner’s progress, assessment, navigation, and more.
Types of variables
There are two types of variables in SmartTutor – System Variables and User Variables.
System variables are pre-defined variables in Captivate. You cannot create a system variable or change the name of a system variable. System variables are read-only.
The following are examples of a system variable:
- Date_DateDDMMYY is a system variable that returns the date in dd/mm/yyyy format.
- Quiz_Score returns the number of points that are scored in a quiz.
User variables are variables you can create and name as you like. The name you assign to a user variable must not conflict with SmartTutor’s internal functions, reserved keywords, exposed system variables, or other hidden variables.
Quiz_ScoreSubtract : subtract score when learner answers incorrectly.
Variable data types in SmartTutor 360
SmartTutor supports three data types for variables.
- Number: The Number variable stores numeric values. Number data types are commonly used in reporting quiz scores, tracking user progress, mathematical operations, or gamification.
- True or False: True or False or Boolean variables contain a true or false value. Use this variable type to create conditional interaction logic, track user choice, or branching.
- Text: The Text variable stores text values. Text variables store characters, such as words or sentences. Use this variable type to capture text-based input, display feedback messages, or hold locale-based content.
- Command : Command variables are systems specific variables used to control the movie player
List of variables
|Returns the version of the application.
|Returns the name of the project author.
|Returns the home page of the project.
|Returns the copyright information of the project.
|Returns the project name.
|Returns the project description.
|Returns the current slide name.
|Returns the elapsed time in the format hh:mm:ss since the presentation started playing.
|Returns the elapsed time in milliseconds since the presentation started playing.
|Returns the remaining time in the format hh:mm:ss.
|Returns the remaining time in milliseconds.
|Returns the total number of slides in the project.
|Returns the number of taken slides in the project.
|Returns true if presentation in review mode.
|Returns the total score.
|Returns the total score as a percentage.
|Returns the highest score.
|Returns the result of the quiz as passed or failed.
|Returns the result of the quiz as true (passed) or false (failed).
|Returns the total number of interactions in the project.
|Returns the number of taken interactions in the project.
|Returns the number of unanswered interactions in the project.
|Returns the number of correct interactions in the project.
|Returns the number of incorrect interactions in the project.
|Returns the detailed report.
|Returns the detailed report with correct responses.
|Returns the current time in the format hh:mm:ss.
|Returns the day of the week. The range is from 1 (Sunday) to 7 (Saturday).
|Returns the current hour in the 24-hour format.
|Returns the current minutes in the format mm.
|Returns the current month in the format mm.
|Returns the current year in the format yyyy.
|Returns the current date in the format of the locale on the viewer’s computer.
|Returns the current date in the format of the project language.
|Returns the current date in the format mm/dd/yyyy.
|Returns the current date in the format mm/dd/yy.
|Returns the current date in the format dd/mm/yyyy.
|Returns the current date in the format dd/mm/yy.
|Returns the current date in the format yyyy/mm/dd.
|Returns the current date in the format yy/mm/dd.
|Gets or set the current slide index, starts from 1. Set the value to a number to go to the slide at that index number.
|Set or checks if the presentation is paused. Set the value to true to pause the presentation.
|Set or checks if the presentation is playing. Set the value to true to continue the presentation.
|Gets or set the current progress of the presentation in milliseconds. Set the value to a number to go to a specific time of the presentation.
|Gets or set the playback speed. The range is from 50% to 200%.
|Mutes or unmutes the audio. Set the value to true to mute the audio.
|Gets or set the audio volume. The range is from 0 (mute) to 100 (maximum).
|Shows or hides the closed caption. Set the value to true to show the closed caption.
|Shows or hides the bottom bar. Set the value to true to show bottom bar.
|Shows or hides the outline. Set the value to true to show the outline.
|Shows or hides the side bar. Set the value true to show the side bar.
|Set the value to true to go to the next slide.
|Set the value to true to go to the previous slide.
|Set the value to true to go to the first slide.
|Set the value to true to go to the last slide.
|Set the value to true to go to the previously visited slide in the navigation history.
|Set the value to true to go to the next slide in the navigation history.
|Set the value to true to end the course.
|Set the value to true to restart the course.
|Set the value to true to show the information dialog.
Create a variable
- Go to Home tab on the ribbon, click Variables button to open Variables dialog box
- When the Variables window opens, click the Create a new variable icon () in the bottom left corner.
- Give your variable a recognizable name so it’s easy to identify later.
Add Variable dialog box
- Choose the Type of variable you want to create. SmartTutor 360 supports three types:
- True/False: True/False variables are often called Boolean variables. They’re either true or false. They’re great for creating toggle buttons and restricting learners’ options. For example, you might use a true/false variable to track whether a certain event has occurred, then let learners proceed to the next slide only when the variable is true.
- Text: Text variables hold text values. Common uses include personalizing content by displaying the learner’s name throughout a course and evaluating text-based interactions. Text variables can hold up to 32,767 characters.
- Number: Number variables hold numeric values. Common uses for number variables include tracking the number of times a particular event has occurred and performing mathematical calculations.Number variables can hold static values, or you can make them random by entering starting and ending values for a range of numbers.
- Enter a default Value. (The default value for text variables can be blank.)
- Click OK to save your new variable.
- Click OK again to close the Variables window.
Use a variable in a project
Actions on variables
SmartTutor 360 lets you add interactions to objects using variable-based actions. The following actions are available in the Actions panel in Properties.
Need to change the value of a variable during a course? Easy. Just add an Adjust variable trigger. View this user guide to learn more about actions.
Evaluating Variables in Trigger Conditions
You can use variables to add conditions to triggers. View this user guide for details.