This page explains how to use a number of command variables that do not relate to any specific category.
- Heading (optional)
- Interactive Object Name (optional)
- Criteria (optional)
- For the first two parameters, if you include the name of a Captivate variable inside of double dollars signs (for example: $$MyVar$$) that variable name will automatically be replaced with its value.
xcmndAlert will cause an alert box such as the following to appear.
The first parameter will change the message that appears in the main section of the alert.
The following assignment will produce the alert box below.
Assign | xcmndAlert with This is my message
As covered in the CpExtra Basic Concepts > Parameters section, CpExtra automatically removes spaces from parameters to help it process faster. However, as shown above, this does not lead to a readable message.
To get around this issue, enter the parameter as an explicit string, by putting square braces on either side of the message.
Assign | xcmndAlert with [This is my message]
By default, all alerts will appear with the title CpExtra Alert. The alert box title can be changed using the second parameter.
Assign | xcmndAlert with [This is my message], [This is my title]
With both the first and second parameter CpExtra includes a unique feature. If within the string you include the name of a Captivate Variable surrounded with double dollar signs ($$), then CpExtra will swap that variable name out with its value. This is very useful for debugging advanced action interactions.
For example, let's say we have a variable called MyVar. We want to know what value MyVar has at the moment. So we can write the following alert.
Assign | xcmndAlert with [Value of MyVar: $$MyVar$$]
From the result below, we can see that MyVar at that instant had a value of 16.
The third and fourth parameters are the same as the two parameters of the xcmndCallActionOn variable. They allow you to specify an action which will be run after the learner clicks the alert box's ok button.
With the third parameter you must specify the name of an interactive object (a slide object that has success/failure criteria, such as: Buttons, Shapes, Text Entry Boxes, Click Boxes)
With the fourth parameters you must specify which action on that interactive object you wish to be called. This can be either success, failure or if you are pointing to a text entry box, onFocusLost.
If you do not define the fourth parameter, CpExtra will assume you want to call the interactive object's success action.
If you do not define the third parameter, CpExtra will assume you don't want to call an action after the learner clicks the ok button.
If you do not define the second parameter, CpExtra will assume you want to use the default title of CpExtra Alert.
Assigning xcmndCompleteSlide with a slide number or slide label will cause that slide to be marked as complete, even if the user has not visited and viewed that particular slide.
The following code would complete the 5th slide in the course.
Assign | xcmndCompleteSlide with 5
The following code would complete the slide in the course with the slide label MenuPage.
Assign | xcmndCompleteSlide with MenuPage
You can also write out a comma delimited list of slides to be completed. This could be any mix of slide numbers or slide labels.
Assign | xcmndCompleteSlide with 5, MenuPage, Conclusion
You can also order xcmndCompleteSlide to complete a range of slides by using a dash (-) character. The following code would complete slides 5 to 17
Assign | xcmndCompleteSlide with 5 - 17
You can also use slide labels to define ranges.
Assign | xcmndCompleteSlide with MenuPage - Conclusion
Note: If you're using slide labels with xcmndCompleteSlide and the slide labels have spaces in their names, you should enter the slide name as an explicit string as follows.
Assign | xcmndCompleteSlide with [Menu Page]
What do we mean by 'Slide Completion'?
When a slide is marked as complete at run-time, it does two things.
- The topic item in the Table of Contents is marked with a checkmark to indicate it has been done.
- If the course is using SCORM to report user interaction and scoring data to an LMS, the completion criteria determines whether or not the user has finished this module. Completion criteria settings are found under Preferences > Quiz > Reporting.
A commonly used completion criteria is Slide views. As shown in the example screenshot above, the user would be required to visit 100% of the slides in the course in order to have the course marked as complete.
However, in courses using branching scenarios, it is possible for a user to reach the end of the lesson, thereby completing the course, even though they didn't visit every slide. The completion percentage can be marked down to a lower percentage in the Quiz > Settings to accommodate the fact that not all slides need to be viewed, however, this is often an unacceptable solution to some clients because they want users to be awarded 100% completion even when all slides were not visited.
Under either of these circumstances, you can use xcmndCompleteSlide to mark unvisited slides as complete, thereby allowing items in the Table of Contents to be marked as checked, as well as allowing user to receive 100% credit in the LMS for successful completion of a course, even though a far lesser percentage of slides may have in fact been visited.