CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from...

15
User-Defined Variables © Trivantis Corporation 2011 1 | Page Instructions for creating user-defined variables in Lectora To create a variable: 1. Click the Variable Manager icon from the Tools toolbar or select Variable Manager from the Tools menu. a. The Variable Manager window opens. b. Click on the User-Defined tab if the Variable Manager window is not already opened to this tab. 2. Click the Add button. The new variable is added to the list. 3. Use the controls within the Variable Information box to specify the following: Variable Name: Specify the name for the variable. This name must be unique to all existing variable names. Variable names cannot contain spaces or special characters. Initial Value: Specify the initial value for the variable. This is the default value of the variable when the published title is launched. Retain variable value between sessions: Select this to retain the variable's value through subsequent launches of the published title. With this selected, if the variable value has changed, the next time the user launches the published title, the variable will load with the previously modified value. Random initial value: Select this to assign a random integer value to a variable. When you select this option, specify the Min Value and Max Value in the fields provided. When the published title is launched, the default value of the variable will be a random number greater than or equal to the Min Value specified and less than or equal to the Max Value specified. 4. Click OK to create the new variable. Additional comments from Alliant Quality Partners: Lectora also allows you to create user- defined variables on-the-fly. When you are in the process of adding an action that involves modifying a variable, the option to create a variable is available. Simply click the New Variable button and define its properties from within the Action Properties box.

description

 

Transcript of CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from...

Page 1: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

User-Defined Variables

© Trivantis Corporation 2011 1 | P a g e

Instructions for creating user-defined variables in Lectora To create a variable:

1. Click the Variable Manager icon from the Tools toolbar or select Variable Manager

from the Tools menu.

a. The Variable Manager window opens.

b. Click on the User-Defined tab if the Variable Manager window is not already

opened to this tab.

2. Click the Add button. The new variable is added to the list.

3. Use the controls within the Variable Information box to specify the following:

Variable Name: Specify the name for the variable. This name must be unique to all

existing variable names. Variable names cannot contain spaces or special

characters.

Initial Value: Specify the initial value for the variable. This is the default value of the

variable when the published title is launched.

Retain variable value between sessions: Select this to retain the variable's value

through subsequent launches of the published title. With this selected, if the variable

value has changed, the next time the user launches the published title, the variable

will load with the previously modified value.

Random initial value: Select this to assign a random integer value to a variable.

When you select this option, specify the Min Value and Max Value in the fields

provided. When the published title is launched, the default value of the variable will

be a random number greater than or equal to the Min Value specified and less than

or equal to the Max Value specified.

4. Click OK to create the new variable.

Additional comments from Alliant Quality Partners: Lectora also allows you to create user-

defined variables ‘on-the-fly’. When you are in the process of adding an action that involves

modifying a variable, the option to create a variable is available. Simply click the New Variable

button and define its properties from within the Action Properties box.

Page 2: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Step-by-Step Summary of Variable Activity

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

Page 3: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Step-by-Step Summary of Variable Activity

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

Page 4: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Step-by-Step Summary of Variable Activity

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

What developer sees… Summary of Programming

#1 (blue button) is the trigger that runs the action groups for showing the images and luggage stickers, based on questions answered. #2 (red button) is the trigger that resets the form to clear out answered questions. #3 when radio button Airplane is selected, group is hidden; plane is revealed. #4 when radio button Cruise Ship is selected, group is hidden; ship is revealed. #5 show respective group of images when the reason for travel is a match (varReason equal to 1,2,3,4) #6 show respective group of images when the travel destination is a match (varDestination equal to 1,2,3,4)

Page 5: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Programming Variables – Storyboard Example

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

Let’s say we have an example where the learner is in a course and they are going on a trip… they are talking to a travel agent who is asking them

questions related to their travel. Based on the answers to some questions, we can help them pack their suit case.

Here is a storyboard example…

Variable Name

Initial Value

Possible Values

When this Happens… Set this Value… And Do this… But Only if… Otherwise…

varReason 0 1 = business meeting 2 = sun bathing 3 = sight seeing 4 = hiking

Sun Bathing is selected

varReason=2 Show 2 Sunbathing group* * group images so that only one action is required to show the entire group.

Reason is 2

Ask for missing information.

varDestination 0 1 = Hawaii 2 = New York 3 = Arizona 4 = Seattle

Hawaii is selected varDestination=1 Show Hawaii luggage sticker Destination is 1 Just do it!

varTravelMode 0 1 = airplane 2 = cruise ship

Cruise Ship is selected varTravelMode =2 Show cruise ship image Mode of travel selected is Cruise Ship

Ask for an answer to the question.

Using a simple table like this to storyboard (plan out) your activities can help you THINK through the variables before you program them.

Page 6: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Variable Examples Explained

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

Example 1 User-Defined Variables This example shows how you can guide the learner down a specific path by asking them to make a choice, and then using that information to maneuver the course in that direction.

We know from the web that radio buttons signify a single selection and checkboxes imply multiple selections. In this Lectora example, the radio button group (modes) is used to restrict the learner to one choice. Without it, more than one radio button could be selected. The Lectora form object (transportationForm) holds the objects the learner sees.

What the developer sees… What you need to know…

truckActions; planeActions; trainActions; boatActions are Lectora Action Groups. Each time a radio button is selected, a series of actions is executed (see #4). First the screen is cleared of any previous selections, and then the variable is asked (ModVar) to remember the current selection, followed by their current choice being presented. Clearing the form first ensures the learner will always see the results of the current selection.

vehicleImages is a group that contains the individual images of each transportation mode.

userChoices is a group that contains the Lectora Form object (transportationForm). That form holds the Lectora radio-button group (modes), which is used to communicate the learner’s selection by way of actions that are added to the individual radio. This group also holds the graphics and text the learner sees on the screen.

varFeedback is a group that holds the graphics and text for feedback presented to the learner when they make a selection. For example, if they select trucks, the truck image is presented, along with the text related to that selection. The action groups and variables work together to remember the selection and present the appropriate text/image combination.

Page 7: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Variable Examples Explained

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

The individual radio buttons trigger the programming actions in Lectora. When a radio button is selected, the action linked to that button is executed. If your programming calls for more than one action, you must use an action group to execute the string of actions (if the trigger is a radio button).

This example executes an (action group) triggered by a radio button. There are at least 4 other ways this activity could be programmed in Lectora: 1. Display each mode as a text

hyperlink (links can trigger one action so an Action Group is required if multiple actions are needed).

2. Display each mode as a labeled button and attach as many actions as you wish to the button.

3. Display each mode as an image and attach as many actions as you wish to the image.

4. Display each mode as text, format the text to LOOK like a link, lay a transparent button over the text and attach as many actions as you wish to the button.

Page 8: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Variable Examples Explained

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

An Action Group is a series of actions that are grouped together. When the group is called the actions are run in the order they are listed in the group. The actions in the Action Group must be placed in their proper order; first come, first run!

This example sets the value of our variable (_varMode) to TRUCKS! When the truck option (radio button) is selected. The same variable can be used for the other three options… remember that variables can be reused.

Page 9: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Variable Examples Explained

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

Conditions can be placed on actions if you don’t want the action to be carried out unless the condition(s) are true… In this case we want to show the value of TRUCKS! if _optionTrucks was selected. Two variables were used to create this interaction; varValue and _varMode. We set the value of _varMode to TRUCKS! and we modified the variable

Page 10: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Variable Examples Explained

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

Example 2

Reserved Variables

This example demonstrates how you can use Reserved (predefined) variables in your e-Learning. As shown here, reserved variables include the current date and time, which platform the learner is using, how many pages are in the course, etc.

What the developer sees… What you need to know…

In most cases, you can use the Change Contents action in Lectora to easily change the content of a text box to the value of the reserved variable. The Action Properties displayed below defines how our Reserved Variable sample page is programmed to show the current date, current time, user platform, page count and current page name.

Page 11: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Variable Examples Explained

Alliant Quality Partners, Inc. Chicago e-Learning & Technology Showcase 08/16/12

-- end of document --

Page 12: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Reserved Variables (Predefined)

© Trivantis Corporation 2011 1 | P a g e

Predefined Variable Description Dynamically Updated?

BrowserType This variable contains the name of the browser currently used to view the title. The variable is set to Lectora when run in preview mode, and LectoraViewer when run as a published CD title. For titles published to the Web, the variable value contains the browser used to view the title, such as Internet Explorer.

No

CurrentChapterName This variable contains the name of the chapter that includes the current page being displayed. If there is no current chapter, then this variable has the value of Unknown.

Yes

CurrentDate For titles published to the Web, this variable contains today’s date in the form <Day of the Week>, <Month> <Day>, <Year>. For example: Wednesday, March 11, 2008. For titles published to a single-file executable or CD-ROM, this variable contains today’s date in the form <Month> <Day>, <Year>. For example: March 11, 2008.

No

CurrentPageName This variable contains the name of the current page. Yes

CurrentSectionName This variable contains the name of the section that includes the current page being displayed. If there is no current section, then this variable has the value of Unknown.

Yes

CurrentTime This variable contains the current time in the form hh:mm AM/PM. For example, 4:20 PM.

No

CurrentTitleName This variable contains the name of the title. Yes

ElapsedTime This variable contains the amount of time the user has spent within the current title.

No

PageInChapter This variable contains the current page number relative to the pages within the current chapter.

Yes

PagesInChapter This variable contains the total number of pages in the current chapter.

Yes

PageInSection This variable contains the current page number relative to the pages within the current section.

Yes

PagesInSection This variable contains the total number of pages in the current section.

Yes

PageInTitle This variable contains the current page number relative to the entire title. If your title contains frames, this variable contains the current page relative to the total number of pages within that frame.

Yes

PagesInTitle This variable contains the total number of pages in the Yes

Page 13: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Reserved Variables (Predefined)

© Trivantis Corporation 2011 2 | P a g e

title. If your title contains frames, this variable contains the total number of pages within that frame.

Platform This variable contains the name of the platform on which the published title is running. For CD-published titles, this could contain Microsoft Windows NT, Microsoft Windows XP, and so on. For titles published to the Web, the variable contains Win32 for 32-bit Windows platforms, and MacPPC for Macintosh PowerPC platforms.

No

PublishDate This variable contains the date and time that the title was published in the form <Month> <Day>, <Year> hh:mm AM/PM. For example, July 21, 2008 4:20 PM.

No

<test name>_Score For each test in the title, a variable will be created that will contain the score of the test. If the test has not yet been taken or the test cannot be scored, the value is 0.

No

<test name>_<test section>_Score

For each test section in the title, a variable will be created that will contain the score of the test section. If the test has not yet been taken or the test cannot be scored, the value is 0.

No

Question_#### This variable contains the user's answer to the question. This variable name can be changed within the question's properties.

Yes

RadioGroup_#### This variable contains the user's selection from the radio buttons contained in the group. This variable name can be changed within the radio button group's properties.

Yes

Radio_#### For each radio button (not contained in a radio button group) in the title, a variable will be created that will contain whether the radio button is selected. If selected, the variable will have a value of "on" and otherwise will have no value. This variable name can be changed within the radio button's properties.

Yes

Checkbox_#### For each check box in the title, a variable will be created that will contain whether the check box is selected. If selected, the variable will have a value of "on" and otherwise will have no value. This variable name can be changed within the check box's properties.

Yes

Entry_#### For each entry field in the title, a variable will be created that will contain what the user has typed within the entry field. This variable name can be changed within the entry field's properties.

Yes

DropList_#### For each drop-down in the title, a variable will be created that will contain what the user has selected from the drop-down list. This variable name can be

Yes

Page 14: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Reserved Variables (Predefined)

© Trivantis Corporation 2011 3 | P a g e

changed within the drop-down list's properties.

List_#### For each list box in the title, a variable will be created that will contain what the user has selected from the list box. This variable name can be changed within the list box's properties.

Yes

If you have designated your title as an AICC/SCORM/CourseMill (3.x and above) Published Title, the following additional variables are available within your title:

Predefined Variable Description Modifiable?

AICC_Core_Lesson This variable contains information used by the published title to properly calculate the score of the user in the current title. If you modify the value of this variable within the content of a title that contains more than one automatically graded test, then the AICC_Score of the student cannot be properly updated and reflected to the AICC/SCORM Learning Management System (LMS).

Yes

AICC_Core_Vendor This variable contains the information required by Lectora when running an AICC-compliant title within an AICC learning management system. This variable is not used by Lectora-published content.

No

AICC_Course_ID This variable contains the id of the course in the AICC/SCORM learning management system.

No

AICC_Credit This variable reflects whether the AICC/SCORM title is being taken for "credit" or just in a "browse" mode.

No

AICC_Lesson_ID This variable contains the name of the title's assignable unit.

No

AICC_Lesson_Location This variable contains the current location within the title content. The Lectora published content sets this variable on every page of the title to reflect the current location of the student within the AICC/SCORM LMS.

Yes

AICC_Lesson_Status This variable contains the current status of the course within the AICC/SCORM LMS. Lectora sets the value of this variable to incomplete. The AICC/SCORM LMS will further modify the variable based on the current AICC_Score for the user and the value specified as the Mastery Score.

Yes

AICC_Score This variable contains the average of all test scores in the published title. If you modify the value of this variable within the content of a course that contains more than one automatically graded test, the modification will be lost when the user completes an automatically graded test.

Yes

Page 15: CETS 2012, Christine O'Malley, handouts for Using Variables in Lectora to Collect Information from Your Learners

Reserved Variables (Predefined)

© Trivantis Corporation 2011 4 | P a g e

AICC_Student_ID This variable contains the user id as reported by the AICC/SCORM LMS.

No

AICC_Student_Name This variable contains the user name as reported by the AICC/SCORM LMS.

No

AICC_Time This variable contains the total time the user has been in the published title. This value is automatically updated while the student is viewing the title. If you modify the value of this variable, the modification will be lost when the student exits the title. Also, this variable must be in the format of HH:MM:SS:mm to be valid when reported to the AICC LMS.

Yes

CMI_Core_Entry This variable is only accessible in SCORM 2004 published titles and contains information related to whether the student has previously accessed the published title.

No

CMI_Core_Exit This variable is only accessible in SCORM-published titles and is used to indicate how or why the student exited the published title.

Yes

CMI_Completion_Status This variable is only accessible in SCORM 2004 published titles and determines the point at which the student has actually completed viewing the published title. In a SCORM 2004 published course, the author MUST set this variable at the point in the course that the student has been determined to have completed viewing the necessary content for the course.

Yes

If the title is being created for placement on the CourseMill 2.0 learning management system, the following additional variables are available:

Predefined Variables Description Modifiable?

CM_Course_ID This variable contains the ID of the course as defined in CourseMill.

No

CM_Course_Name This variable contains the name of the title as defined in CourseMill

No

CM_Student_ID This variable contains the student ID as reported by CourseMill.

No

CM_Student_Name This variable contains the student name as reported by CourseMill.

No