Using State Numbers in Formula question

Intro

Review the output tutorial published in this post. The two first use cases were about a knowledge check question where the learner needs to create physics formulas, by clicking the terms in the formula. Those terms are multistate objects, used as buttons. In a previous post we created one shared action to get the 'State number' which is stored in an associated variable for each multistate object. That same post also explained how to choose the sequence of the states.

The first use case has 3 terms in the formula, the second one has 4 terms. The terms are identical multistate objects, at the start of the exercise they show the same Normal state.

In this article youi'll see how to create the action for the Submit button, and the On Enter action which is needed to reset the slide and thus allow multiple visits to the slides.

Submit actions

Those are advanced action triggered by the Success event of the Submit buttons.

Formula with 3 terms

To the left of the equal sign the term should be 'Force', which is state 3 in the multistate object.

To the right of the equal sign we need 'Pressure' and 'Area', sequence is not important. Those are states 1 and 2. The easiest way is to calculate the sum of the two state numbers, which should be 3. To avoid confusion, create another user variable v_right to calculate the sum. The condition will be very simple: v_1 (state number to the left of the equal sign) needs to be equal to v_right.  To show the result, another multistate object SS_Feedback was created with these three states:

This feedback shape is on the slide (not hidden) but the Normal state is invisible to the learner. I used the same feedback for the next slide (4 term formula) by timing it for the rest of the project. It will be hidden after the two formula slides.

The Submit action doesn't need much explanation; I used the Delay command to mimick the default time a feedback is shown, allowing a new attempt:

Formula with 4 terms

Due to the sequence of the states, a correct formula will also have the same sum to the left and to the right of the equal sign. Of course we need another user variable v_left  to store the sum to the left. However, checking the sums will not be sufficient in this case. If the learner chooses exactly the same states on both sides, the sums will also be the same. Example: if only the states for the 'oval 'are chose on both sides. To exclude that situation, I use another expression with a multiplication of the state numbers. For the result of the multiplication two extra user variables a; re defined: v_leftM and v_rightM

Example: if only 'oval' states are used sum will be: 5 = 2 + 3. However the multiplication will result in 6 = 2 * 3. Whereas for the drum the sum is 5 = 1 + 4  but the multiplcation will result in 4 = 1 * 4.  Look at the Submit action in this case:

Enter actions (reset)

Those are advanced actions triggered by the On Enter event of the slides, to reset the situation. 

Formula with 3 terms

The 3 variables storing the state numbers need to be reset to their default value (1: corresponding with the Normal state). That is not necessary for the v_right, because it is always calculated. The option 'Retain state on revisit slide' is not activated, which means that on revisiting the slide the Normal state is reset automatically. The variable v_states needs to be redefined.

Since the multistate object SS_Feedback is timed for more than one slide, and can be hidden by actions on later slides, it is important to show this object and put it back in the Normal state. The automatic reset to the Normal state is not happening due to the timing. The Next button needs to be hidden.

Formula with 4 terms

The 4 variables storing the state numbers need to be reset to their default value (1: corresponding with the Normal state). That is not necessary for v_right, v_left, v_leftM and v_rightM because they will be calculated. The option 'Retain state on revisit slide' is not activated, which means that on revisiting the slide the Normal state is reset automatically. The variable v_states needs to be redefined.

The resetting for the feedback object is for the same reason as in the other Formula slide.

More?

I used a similar workflow in this small project, which is meant as exercise for the math's class about Multiplication tables.

It is a responsie project, uses the same shared action I have used in the use case I described here. The Submit actions are a little bit more complicated. Your challenge: try to replicate this project. This is the link:

CrunchNumbers










Quiz Basics 3: Attempts and Scores

Intro

In the first two articles of this basic course about Quizzing, I explained the Terminology, and the Submit Process.

Those posts applied to all types of questions: scored, random, Knowledge Check, pretest slides. This post will be talking exclusively about scored (graded) quiz slides and random quiz slides which are graded. For those slides the results are stored in the quizzing system variables, and you can have the score slide in your course. You will get some tips about the default score slide at the end. Scoring doesn’t exist for Knowledge check slides, you can only choose attempts on question level, not on quiz level.  Pretest questions have scoring as well, but the values are stored in different system variables, and are only meant to navigate the learner to another slide,  based on the pretest result.

This article will explore the scoring and attempts on two available levels:

  • on question level
  • on quiz level

Attempts/Scores on Question level

Setup for both is done in the Quiz Properties panel. That panel appears automatically in the newbie UI when you insert a quiz slide (or a random slide) in the right docking station. For quizzes however I strongly recommend to switch to the Expert UI (check the option ‘Enable custom Workspaces….’ under Preferences, General Settings). Set up a workspace where both the Quiz Properties and the Properties panel are visible. Reason is that you need the Properties panel for partial scored MCQ slides with multiple correct answers.

Attempts

In the default setup the number of attempts for graded questions is set to 1. The feedback messages for Correct and Incomplete are checked and 1 Failure message. The actions for Success and Last Attempt are both set to Continue. You could check the option Infinite Attempts, but I strongly doubt you’ll want to have the learner in such an infinite loop.  A limited number of attempts however can be a good choice. If you allow more than one attempt, do not forget to check the ‘Retry message’ because that is not done automatically. Have a look at this screenshot for True/False Question, to the arts marked with a blue rectangle. I set the number of attempts to , and checked Retry. The Failure message was left at its default 1 message.

I kept the default Continue actions as well, but moved the pausing point closer to the end of the question slide (see previous article) to minimize the waiting time after the second step of the Submit process.

Score/penalty for 1 correct answer

Default score for all questions is set to 10 points. Since some LMS’s don’t like to see total scores greater than 100 points, and all questions don’t merit the same score you will certainly want to change those scores. BTW: later on I will offer an exploring post about the wonderful Advanced Interaction panel (F9), unknown to many because it never appears automatically in the newbie UI. It is not only about ‘advanced’ actions at all.

Changing the score happens in the Quiz Properties panel for all question types with a black/white score. B/W score means that you only get the score if everything is correct, score will be zero in all other cases. All question types, except the MCQ with multiple answers are validated with this rule, even Matching, Hotspot and Sequence. In the screenshot above (T/F), you see the score reduced to 4 points.

I also added a penalty: this score will be subtracted from the total score if the answer was wrong after the last attempt. You don’t have to enter a negative number here. Beware: in SCORM 1.2 reporting a negative result at the end will be reset to zero.

MCQ with multiple correct answers and partial scoring

Have a look at this screenshot, set up for such a question slide, with 5 answers. Two out of them are correct, each has a positive score of 5 points. The 3 wrong answers get a penalty of 2 points each. Neither the score nor the penalty can be set up in the Quiz Properties panel, they are dimmed. You have to select each individual answer, and setup score in the Properties panel of that answer (visible in the screenshot as floating panel next to the Quiz Properties):

The 4th answer, wrong answer, is selected in this screenshot. There is no Penalty field in the Properties panel, tab ‘Options’, only ‘points’. Since this needs to be a penalty I entered -2points. Same for the other wrong answers. The correct answers got positive points (5 for each). The dimmed numbers for Score and Penalty on the Quiz Properties panel are calculated by Captivate to 10 points and 6 points. I had to check the ‘Partial correct’ message, was not done automatically although Multiple answers was chosen.

In this example I changed the actions (Success/Last Attempt) to ‘Go to Next Slide’, didn’t move the pausing point of the quiz slide. This is the second possibility to narrow the waiting time after Submitting the result.

You see that 3 attempts are possible for this question (green markings).  But the Retry message is unavailable, dimmed. Reason is that I have chosen to show 3 Failure messages, different one after each attempt. You need to include the warning about clicking the slide (or pressing Y) for the last Failure message which appears after the last attempt.

Quizzing System Variables

These quizzing system variables (see also: Using Quizzing System Variables) are linked to individual question slides:

  • cpQuizInfoAnswerChoice: after submitting the answer (see this post for a typical use case)
  • cpQuizInfoLastSlidePointScored: after submitting the answer
  • cpQuizInfoMaxAttemptsOnCurrentQuestion: while on that slide. Beware: there is no exposed system variable telling which attempt the learner is taking at this moment on question level, only the maximum allowed attempts can be retrieved.
  • cpQuizInfoNegativePointsOnCurrentQuestionSlide: maximum penalty for this question slide
  • cpQuizInfoPointsPerQuestionSlide: maximum score for this question slide.
  • cpQuizInfoQuestionPartialScoringOn: Boolean
  • cpQuizInfoQuestionSlideTiming: if you use a time limit on the quiz slide
  • cpQuizInfoQuestionSlideType

Attempts/Score on Quiz Level

The number of allowed attempts on (total) quiz level is set up in the Quiz Preferences, Pass or Fail.  Default setup is one attempt. If you allow multiple attempts, don’t forget to check the option to ‘Show Retake Button’. When clicking that button, all questions will be reset and the quiz system variables will be cleared.

If you also allow Review (Quiz Preferences, Settings), you have to be aware of the fact that all attempts on Quiz level will be considered to be exhausted if the learner clicks the Review button (also on the score slide). To prevent confusion use this easy trick: drag the Retake button on top of the Review button on the results master slide (or the score slide). Once the attempts are exhausted the Retake button will disappear and Review button becomes visible. Problem is that this is perfectly possible for a non-responsive (blank) project or a responsive project with Breakpoints. But a normal fluid box doesn’t allow stacking of buttons, unless you define the fluid box as being static. I will post a workaround in my “tweaking posts”, later in the Quiz sequence of posts.

The Total Score on quiz level will be calculated from all the scored objects in the course (see Advanced Interaction panel) and stored in a quizzing system variable cpQuizInfoTotalQuizPoints. Except for the feature ‘Branch aware’ that will be a fixed number when starting the course.  Other quizzing variables  (see post) linked to the quiz level are:

  • cpInQuizScope
  • cpInReviewMode
  • cpInfoPercentage:  appears on the results (score) slide as ‘Accuracy’ ‘percent’
  • cpInfoAttempts: appears on the results slide as ‘Attempts’ ‘total-attempts’
  • cpQuizInfoPassFail: Boolean
  • cpQuizInfoPointsscored: appears on the results slide as ‘You scored’  ‘score’
  • cpQuizInfoQuizPassPercent
  • cpQuizInfoQuizPassPoints
  • cpQuizInfoTotalCorrectAnswers:  appears on the results slide as ‘Correct Questions’ ‘correct-questions’; beware: partially correct questions are seen as correct
  • cpQuizInfoTotalProjectPoints: appears on the results slide as ‘Maximum Score’ ‘max-score’
  • cpQuizInfoTotalQuestionsPerProject: appears on the results slide as ‘Total questions’ ‘total-questions’
  • cpQuizInfoTotalUnansweredQuestions

The Continue button on the Score slide has about the same functionality and importance as the Submit button on quiz slides. That actions specified under Quiz Preferences,  Pass or Fail (after Last attempt on Quiz level) will be done after clicking that button. The pausing point on the score slide is linked with that button. You can move that pausing point the same way as for the quiz slides, closer to the end of the score slide. It is recommended not to have the score slide as last slide in a course, but have at least one more slide. That way you’ll be sure that the results will be transferred to the LMS.

Memory game setup - version 2021

Intro

As new year's blog I offered a simple memory game in this portal

Let 's Play and Dream

The setup however is not explained in the blog. Since another user asked about the creation of such a memory game, this blog will explain shortly the workflow. It will be limited to the game itself, not to the consequences of having succeeded it.

Setup slide

Besides the use of ONE shared action and ONE advanced reset action, all is based on using multistate objects, groups and variables. It can easily be extended to more than 6 pairs as in the example file. The background image, which in this case is only a static image of all the small images, can be replaced by another image (or a random image if you use JS), which can be included in the game itself. To see what I mean, I have to refer to my first version of this game, 10 years ago: 

Concentration game created exclusively with Captivate

If you want to play that old game, I warn that it is a SWF.

Timeline

Have a look at the timeline of the game slide

The two buttons with the same back image are in a group. There are 12 buttons, so you end up with 6 groups. The buttons themselves indicate where they are. The expanded group Gr_6 has the second button on the third row and the fourth button on the second row.  However you can set up labels as you want.

Each button is a multistate object. Normal state is the symbol for the virus, the Back state has the image. 

Variables

Each group has a tracking variable: v_1 - v_6. Their default value is 0.

The variable v_click starts with a default value of 0. It will track the button clicks (first or second).

The variable v_counter will track the number of correct paired images. It starts at 0, and the game is finished when reaching 6.

The variable v_first is needed to reset the slide, will store the frame number of the first slide frame. For more information check: Replay or Reset?

Shared action 'ButtonAct'

This action is triggered by the 12 buttons, and has only 3 parameters as you can see in the preview of the action:

You see 4 decisions:

Always  is a standard action, it shows the back state of the clicked button and disables it. The tracking variable for the group and v_click are both incremented by 1.

WrongAct (conditional) checks if this is a second click, and it didn't match the first click (because v_1 is equal to 1). In that case the Reset workflow is used. The advanced action 'EnterGame' (see below) will reset what is necessary.

CorrectAct (conditional) if both clicks pointed to the same image, the variable v_counter is incremented. The group with the two buttons will be hidden, to reveal the background image. 

Done: (conditional) checks the value of the variable v_counter and navigates to the conclusion slide if it reaches the value 6, which means the game has been completed successfully.

Advanced action EnterGame

This action is essentially resetting the slide. 

 Since buttons can have been disabled (see ButtonAct) all buttons need to be enabled. A group tracking variable can have a value 1, needs to be reset to 0. The variable v_click needs to be reset to 0 as well. The only variable keeping its value is v_counter.

Extension tips?

More possibilities will not need a lot of work. If you want to reuse the workflow in more projects a shared action has a lot of advantages.  If you import that action in a new project, the variables v_counter, v_first and v_click will be created automatically including their default value and description. Personally I would use the present advanced action ‘EnterGame’ to create a new shared action, keeping only the variables to reset, not the buttons. If you import that new shared actions at the same time as the first shared action, you don’t have to create the group tracking variables neither. You only have to set up the multistate objects and the groups in the slide.

Want less or more groups? 

It is logical that you’ll need to edit the EnterGame action. What about the Shared action ButtonAct?  Since I wanted to make the workflow simple, I kept the literal ‘6’ for the number of groups. Two possibilities for editing:

Use the Shared action to create an advanced action. Delete the shared action in the Library. Edit the literal to the wanted number, and recreate the shared action. You can even use the same original name.

If you want to reuse this action in multiple projects, replace the literal by a variable (v_max) which you can edit in the variables dialog, or by adding an Assign command on a slide preceding the game slide. 

Background image can be replaced, as I mentioned above.

It is also possible to create a more complicated game, maybe with groups of 3 buttons to match. 

Have fun!

Tweak Remediation: get out of the eternal loop

Intro

The Remediation feature was introduced with Captivate 6. There are many YouTube videos explaining the setup. I still prefer the original one by Shameer Ayyappan. 

The idea is that a learner when failing a Question will be navigated back to a content slide. When clicking the Next button on that content slide learner will return to the Question, and be able to change the answer. That is not a normal behavior for quiz slides, by design answers are blocked and attempts considered to be exhausted when leaving such a slide. 

There are some issues with the feature:

  • The learner will need to give a correct answer before being able to continue to the next slide. Result is an ‘eternal’ loop until the correct answer is given.
  • Each learner will have a 100% score at the end. Not always what you want as developer.

Quite a while ago I designed a workaround to break the ‘loop’. Yesterday a user in the Adobe forums asked for such a workflow. This is the thread.

As usual I checked if the workflow still is functional on the most recent release (I am on 11.5.5.553) and if it could be improved.  You can guess that I replaced the former advanced actions by the much more useful and flexible shared actions.

Example 

Watch this example: it has two content slides, and two quiz slides. For the first question (T/F) remediation feature is used, but after a second failed attempt the learner will proceed to the next question. Remediation for the first slide is using the first content slide. Similar for the second quiz slide (MCQ): remediation is using the second content slide, and learner will go to the next slide (score) after the third attempt. Watch it using this link (rescalable) or the embedded fixed resolution version below:



Step-by-step workflow

The limitation for the workaround is the same as for the default Remediation feature: you cannot use partial scoring for the MCQ slides, because a partially correct answer is considered to be correct by Captivate.

Sort summary of the default Remediation setup:

  1. The next button on the content slide has the command ‘Return to Quiz’ for its Success event. That command will only be done when the slide is visited from a quiz slide. If that is not the case, the Next button uses the action ‘Go to Next Slide’.
  2. Attempts for the question slide is set to 1.
  3. The Last Attempt action for the Quiz slide has the action ‘Jump to Slide, pointing to the appropriate Content slide

To break the eternal loop:

1. User variables

Create two user variables:

  • v_attempt: starts with a default value of 0 and is reusable for each quiz slide (will be reset to 0). It tracks the number of attempts on question level. There is no system variable possible. Only on quiz level you can use cpQuizInfoAttempts.
  • v_max: will get assigned the number of attempts allowed for each question. In the example file, for the first question it has the value 2, for the second one the value 3. That makes it flexible.

Once you have the shared actions in an external library, no need for this first step. Just drag the shared actions (together) from the external library to the project library and they will be created automatically. Since they are in both shared actions, even if you replace the EnterQuest action by an advanced action, it will still be done by importing the second shared action FailureAct.

2. EnterQuest (Shared action)

This (standard) action is triggered by the On Enter event of the quiz slide.

For each quiz slide you’ll need this action to set the value for v_max and to increment the value of v_attempt by 1 to track attempts. This shared action has only 1 parameter: the literal which is the value of v_max for this particular quiz slide. If you want the same number of attempts for all the quiz slides, you can replace this shared action by an advanced action of course.

3. FailureAct (Shared action)

This (conditional) action is triggered by the Last Attempt event of each quiz slide. 

It has one parameter as well: the content slide which needs to be used for remediation.

4. Next buttons

Similar to the default Remediation, you need a Next button on each content slide with the action ‘Return to Quiz’.


Tips and Tricks: Advanced to Shared action (intermediate)

Intro

Recently i presented ‘Deep dive into Captivate with Shared and Advanced actions’ at the Adobe eLearning Word  202 conference.  During that presentation I used the ‘newbie’ scenario because the start poll pointed out that the majority of attendees were not really familiar with those actions. For the intermediate or advanced user, will try to post some blogs about tips which I would have included in my alternative scenario.  You may have seen the memory game which I published yesterday, and shows how you ca n include short JS scripts in the shared action.

The following tips are linked with my more than 19 years history of using Advanced actions, and 6 years with Shared actions. My viewpoints have changed quite a lot in that period. Presently my natural attitude is to reflect in most situations whether a Shared action is not appropriate. Why? One of the reasons is of course rIusability (with an external library), but even more important: it forces me to find better workflows. 

Throughout the presentation I used a demonstration project (include d here as well) FlipCard.   It started with an original slide from the Quick Start Project ‘Alliance’. I added two slides where the functionality of the original slide was extended  to have more functionality (toggle flipcard, forced view, reset of slide on re-enter). I used two different workflows for the Advanced action and the Shared action slides. Why? You’ll discover it below.

You can download the project file using this link.

FlipCard

Actions in the slides

Advanced interaction panel (F9) shows all actions on the 3 slides

Slide 1 (original from the QSP)

As you can see in the screenshot above, this slide has no action On Enter (normally meant to Reset), only   3 similar advanced actions for the flipcards. Those cards are shapes used as buttons, with two states: an image in the Normal state and the explanation in the Active state. Here is a screenshot of the advanced action for one flipcard:

The state Active is shown instead of the Normal state, a spin effect is applied and the shape button (flipcard) is disabled.  This means:

  • You cannot flip back to the image, because the shape button is disabled
  • Nothing happens when all flipcards have been flipped. Without a default playbar or adding a custom Next button, the learner will be blocked
  • When revisiting the slide:
    • the images will show up again, because the option ‘Retain state when slide is revisited’ is not activated
    • the shape buttons remain disabled, no clicking possible
    • which also means there is nothing to pause the slide, after moving throughout the duration (3seconds) of the slide the playhead continues to the next slide

 Slide 2 (extended Advanced actions)

To fix the issues of the first slide, the advanced actions used here look like this example:

This advanced action has two decisions. The changes in a nutshell:

  • The command ‘Go to state ‘Active” has been replaced by ‘Go to Next State’; this means that clicking act a s a toggle, since the shape buttons have only two states. It would also have been an advantage if this action was converted to a SA, one parameter less.
  • To track the clicks, a variable is needed for each of the flipcards, in this screenshot it is v_one. Its default value = 0, is toggled to 1 when the flipcard is clicked and that value remains 1. It is a so-called Boolean variable.
  • The second decision is conditional, checks the value of all the tracking variables and shows in this case a Next button.

When revisiting the slide, some issues are now automatically solved, but to have the slide behave completely like the first time, an action On Enter for the slide was used. 

That action will hide the Next button, and reset the tracking variables to their default value, 0.

Slide 3 (Shared Actions)

Many expected that I would convert the Advanced actions of the second slide to shared actions (at least for the flip act), but I used another workflow. If I use the Shared action ‘FlipAct’ as template for an advanced action for the first flipcard (as demonstrated in the session) it would have looked like this (Preview window):

That looks more complicated:

  • The command ‘Assign var with 1’ has been replaced by an Increment command
  • A new variable v_counter was added to keep track of the clicks. It is only incremented on the first click as you see in the second decision. For shared actions I don’t mind so much about needing more variables. Whe they are not defined as a parameters, they are created automatically when importing the action. Moreover this makes the last decision easier
  • since I need only to check the value of v_counter. Instead of comparing with a literal (which should have been 3 in the first project), another variable v_max was used which will be populated with the On Enter action. That will make the shared action more flexible. 

Result of this workflow is that only 3 parameters are needed for the shared action FlipAct:

For the Reset issue, I could have used an Advanced action, slightly different from the second slide. However I also converted it to a Shared action. Why?  When I drag that SA to another project, all variables (none are parameters here) will be created. For that same reason, I added some variables (here  7). This is a filled in action to be used On Enter, only the last two commands need a parameter. One of them is the number of flipcards (value fo v_max):

Not convinced?

For those who are not yet sure that the second workflow is better for shared actions, have converted the first Flip advanced action to a shared action. These would have been the needed parameters:

This is the situation if you have only 3 Flipcards. If you have 5 flipcards, you’ll will have 2 extra parameters: tracking variables.  The risk of missing to indicate the correct parameters when attaching the shared action to the shape buttons is much bigger than with the shared action I used in the third slide.

 

Review wrong answers in Quiz, skip correct answers

Intro

Similar to most Captivate developers I am busy converting legacy projects with SWF output to HTML output (in my blog). Quite a long time ago, based on questions from users, I wrote this blog post: Limit Review.  At that moment the version was Captivate 6 output was of course to SWF. If you want to view the embedded file, you'll need  Flash Player enabled browser to watch it.

I updated this blog post and created a new Example project. It is interesting to see how much easier the workflow has become, due to two new features:
  • Shared Actions: available since version 7 and improved with version 8. One of my favorite features, much underestimated by most developers for totally unknown reasons. Whereas in the old post I had to create 2 advanced actions for each quiz slide, this new version has only two shared actions, with one parameter.
  • New system variable cpInReviewMode (Quizzing category). It is a Boolean variable with a default value=0. That value will automatically be toggled to 1 when in Review mode.

Example file

I used the edited Theme, based on the Quick Start project ‘Alliance’ which I also used in my previous post with the Survey about upgrading legacy projects. HTML5 output is not as smooth as SWF output. You can compare the old post  (see link mentioned before) .

The example has 7 question slides, different types, using partial scoring and penalty. You can play the rescalable version from this link or watch the embedded one here:


Setup

Variables

This is the only remainder of the original blog.  We will be using another quizzing system variable cpQuizInfoLastSlidePointScored. The value of this variable is changing with each quiz slide. That change happens with the second step of the Submit Process.  More info about the Submit Process of a question slide can be found in this blog post.

We need to track the score for each quiz slide. To achieve that, a user variable is needed for each question slide. In this case, we need 7 user variables. No default value needed:

Labels are not so important, you just need to be able to link them to the quiz slides. If you have a shared action ready as in the first item of ‘Rare tips for Shared Actions‘ that is fine as well.

Events

All events are on the quiz slides:
  • On Enter event: will be used for a shared action EnterReviewAct. Tip: in the Advanced Interaction panel, this action will not appear (which is a pity). The reason is that the columns Success (which normally has the action for On Enter) and Failure (normally On Exit action) are used for the question actions. You can see the Usage of this action in the Library of course. Logically it has been used 7 times, because of the 7 quiz slides:



  • Success event of question (Quiz panel): will trigger a Shared action ‘ScoreQuestionAct’.

  • Last Attempt of question (Quiz panel): will trigger the same Shared action.  This action will be used 14 times. ave a look at this screenshot of the Advanced Interaction panel, where both the Success and Last Attempt events are registered:


Shared Actions

ScoreQuestionAct

This is a very simple standard action, copies the value of the system variable cpQuizInfoLastSlidePointScore to the tracking user variable. That variable is the unique parameter:

This action is triggered by both Success and Last Attempt events. It happens sometimes that you get an error, because the same parameter is used for both events. That is a bug in Captivate, which I have reported since a while, but the actions will work perfectly.

EnterReviewAct

This conditional action triggered by the On Enter event, checks two conditions:

  • Is the learner in Review mode?
  • Did the learner have a positive score on this slide? As you can see in the Advanced Interaction panel (screenshot in previous part),  I used penalty and partial scores.   Partial scored questions are counted as ‘correct’ answers in Captivate.

If both conditions are true, the slide will be skipped.

More?

Maybe you have some comments?  I don’t have a crystal ball, but feel like these two questions may pop up:

  1. Can this workflow also be used for random questions? 
    Answer is Yes: you need to trigger the shared actions for all quiz slides in the pool(s). Of course, you cannot have partial scoring, not penalty in a question pool.

  2. Can you avoid skipping partial scored questions?
    I see a way to do this, but wait for your suggestions.


Using cpQuizInfoAnswerChoice for Survey (Conversion from SWF to HTML)

Intro

Eight years ago I wrote a blog post about ‘Secrets of cpQuizInfoAnswerChoice’. Of course the embedded published project was SWF at that moment. This specific quizzing variable is very useful when you need to evaluate the results of survey slides in order to make decisions. I created a new example file, partially based on slides from the Quick Start Project Alliance. It is part of a ‘decision tree’ which could be used for those who want/need to convert legacy projects to make them ready for publishing to HTML5.

Example file instructions

There is no audio in this example. All quiz slides are Survey slides, and navigation is based on the results of the Survey slides.  Type of slides used are True/False, MCQ with one correct answer, MCQ with multiple correct answers. At the end of each branch (there are quite a lot of possibilities) you will end up on a slide with possible workflows. In this example you’ll find only three ‘results’ slides:
  1. If you have only the SWF output of the legacy project.
  2. If you have the cptx-file but cannot use it directly in the present Captivate version
  3. If you have the cptx file which can be opened in the present version.

To explore a new branch, please refresh the browser. There are more than 3 recommended workflows because of sub-branches.

You can watch the embedded movie below (fixed size) or use the link for a rescalable version.



Values of cpQuizInfoAnswerChoice

This system variable belongs to the category Quizzing. Typical for that category is that the variables are read only, you cannot edit them in Captivate directly.

It is a reused variable, gets a different value after the Submit process on each quiz slide. The value you are getting depends on:

  • Type of question (see below)
  • Numbering (if available) in the question. For several types you can choose between capital characters (A, B, ..), small characters (a, b, …), numbers or None.  None will result in the same value as numbers (my preferred numbering)

In the example file I used three types of questions, which are very common in surveys:

  1. True/False. For that type the value of cpQuizInfoAnswerChoice will be either a character or a number, depending on the chosen numbering type.
    Example: if learner choses “True” value will be A, or a, or 1 (also for None as numbering)
  2. MCQ with radiobuttons (one answer): value will be the character or number of the chosen answer. No problem when shuffling the answers. Although the numbering on runtime will be changed in that case, the original number, as seen in the editing environment, will be stored in the variable.
    Example: Second slide in the example had three answers. You may shuffle the answers on runtime, but if the learner selected this answer, the value of cpQuizInfoAnswerChoice will be ‘1’.
  3. MCQ with checkboxes (multiple answers possible): all chosen answers will be stored, using a separator (in my case a semicolon). If you use shuffling, the reported value will take the numbers originally assigned in the developing environment:
    Example: first slide in the example file looked like this. With the shown selection, the value of the variable will be ‘2;3;4’ even if due to shuffling the numbering was different on runtime.

Short description of the other Question types:

  • Matching: the chosen corresponding  numbers in the first column, with separator(s) will be reported similar to MCQ with multiple answers.
    Example ‘A;C,B’ indicate that in the first column those were chosen to connect with A, B, C in the second column.
  • Sequence: I couldn’t figure out what the meaning was of the reported value, very strange. Look like IDs (like Interaction IDs) separated by semicolumns. Maybe someone can explain?
  • Fill-in-the-Blank: the text chosen for the blanks will appear, with separators.
  • Short Answer: text entered by the learner.

Due to the fact that Captivate’s variables can store strings as well as numbers, if you choose for numbers you can perform calculations (Expression command). I used that feature in an old post about Graded Surveys. Tha particular technique  has not been used in this example.

Used Techniques

I will not explain every detail in this example file, just some tips about the used techniques.

Decision Tree – Branches

Before starting the development, I did sit down to see how many branches I would provide in this survey. The present example results in three main branches, ending up in three different end slides. Those are the slides surrounded by a red box in the screenshot of the Advanced Interaction panel (will blog about its use ASAP). The Survey slides are included in a blue box:

Choice of the branch to follow is tracked by a user variable. Three variables, starting with an empty value:  v_swf, v_cptx, v_scratch. Those variables can have different values, because each main branch has sub-branches.

Example: The branch which will end on slide 12 (SWF_workflows), starts with a value=1 when the learner indicates that the output SWF is the only asset remaining from the legacy file. Based on answers to the other questions, this value can be incremented to 2 or 3. Each of them will lead to different content on slide 12.

Multistate objects

The information on the end slides (12-14) is stored in multi-state containers. The On Enter action of each slide uses the tracking variable for that branch to show the appropriate state. Look at the screenshot of the action triggered On Enter for slide 12:

There are only two decisions  (not 3) because the Normal state is valid for the situation where v_swf==1.

Embedded variables

The result of the poll can navigate to slide 14, with the recommendation to start from scratch. However it is possible that legacy assets can be used: documented/branded theme, assets like graphics files (PS/AI), audio clips, video clips, GIFT or CSV files for questions. To show this information, user variables are inserted in the states on the slide. Their value is either empty, or has a value due to the choices on the very first survey slide. Look at this screenshot, which shows the Normal state (no external library available) for the Scratch slide:

More?

Do you have questions? Please post them in a comment. Maybe we’ll meet at Washington DC, will try to help users struggling with conversion of their legacy projects due to the demise of the SWF player.

Question for you: any idea why a slide seems to be missing in the Advanced Interaction panel (slide 11)?

Find the differences (game)

To all readers: best wishes for a healthy and enthralling 2020!

Have some fun with this small game, created from an Adobe Stock image, using Illustrator (for assets) and Captivate 11.5. Again SVGs are used extensively. You can play the embedded game (fixed resolution) but I recommend to play it from this link which is a rescalable version. It may be easier to find the differences, especially if you are using a big screen.


Lot of SVGs, some multistate objects, one shared action, two small advanced actions + two variables. If you follow me since a while you know that I had lot of fun with all my favourite Captivate tools.  I didn't use any Javascript directly (actions are converted to JS on runtime) but I’m sure this can be done with JS as well.

The usual white screen with grey arrow is replaced by a poster image. After the mysterious title slide game, game and end image are all on the second slide.

Setup

Objects and Timeline

SVGs reign as you can see in the screenshot of the Timeline panel of the game slide:

The stacking (z-order) of the objects is important. From bottom to top you see:

  • Two instances of the same image (SV_Correct to the left and SV_NOK to the right.
  • Two text containers which show the two titles (Tx_Correct and Tx_Difference).
  • A click box CB_Wrong: it is important that this click box is below all other interactive objects, and that its pausing point is at the same time as the other ones (here 1.5secs).
  • 7 SVGs functioning as buttons. Those are the correct hotspots (if you want to cheat... look at the labels). They need to be on top of the click box, but the stacking sequence of those SVGs is not important. The Rollover and Down states of those SVGs have been deleted. One custom state 'Down' has been added, which has the Chinese character for 'OK'.
  • A multistate object functioning as progress bar. The Normal state is invisible (Alpha set to 0), and you see all the states in this screenshot:

    Just a note: there are some display problems with SVGs in the present version, and that can make the previous screenshot bit confusing. Although the circles have the same size in all states, they seem to be smaller when more circles are present. Moreover something seems to be wrong with the C4 state: total width seems smaller than for the other states. Reason was that originally that state switched to 'Custom', instead of Original.
    In this case it is very important that the option 'Original' size is forced for each state.
  • A shape 'Cover', which is rectangular filled with Solid dark gray, with Alpha = 70%.
  • Final image 'SV_Eind' (sorry for the Dutch label). 

Variables 

Two user variables were created:

  • v_counter: with a start value of 0, will be incremented when a correct hotspot has been clicked.
  • v_hotspot: will be set to the number of hotspots minus 1; in this case it is set to 6 since there are 7 hotspots.

Advanced Actions

Two advanced actions are used:

EnterGame triggered by the On Enter event of the Game slide

As usual this standard action will prepare the correct situation for the slide:

WrongAct triggered by the Success event of the Click box CB_Wrong

Another rather simple standard action, to let some audio play and have effects with the cover:


Shared Action 'CorrectHotspot' triggered by the SVG buttons (Success event)

The most important script for this game. Several actions happen when a correct hotspot is clicked:

  • An effect is applied to emphasize the clicked SVG, in this example I used a ScaleTo effect.
  • Secondary an audio clip is played (sort of congratulation)
  • The hotspot needs to be disabled, to avoid having it clicked multiple times.
  • To track the number of discovered hotspots, the counter variable needs to be incremented.
  • Progress has to change in the indicator (yellow circles multistate object)
  • When all hotspots have been found, the final image has to appear (with an effect).

This is a Preview of a filled in action, where the 5 necessary parameters are marked in a color rectangle:

None of the candidate parameters need to be a parameter: the two variables (v_counter and v_hotspot) nor the literals. As I have emphasized many times, it can be tricky to define a literal as parameter. In this particular case it could have been possible to indicate the Delay time needed to listen to the audio clip being defined as parameter. That would be necessary if you want to use audio clips with very different lengths for the the individual hotspots. The parameters are visible in this screenshot:

Why shared action instead of duplicate advanced actions?

You can use exactly the same shared action if you have a different number of hotspots (differences). Just edit the action EnterGame to replace the value to be assigned to the variable v_hotspot. It is the reason I replaced the literal '6' by a variable v_hotspot. Several parameters are used multiple times in the shared action: the name of the progress bar, the hotspot, the audio clip. When using duplicate advanced actions you would have to edit quite a lot. 

One of the disadvantages is the fixed status of the applied Effects. If you want another effect, use the shared action as template for an advanced action, replace the effects and save it as a new Shared action. If you are new to shared actions: contrary to advanced actions it is perfectly possible to save a new action with the same name, provided the older one is no longer used.






Popups on Quiz slides?

Intro

This question appeared recently in the Adobe forums from a user wanting to use (shape) buttons to show popups: “….instruction pop-up is appearing under the question content…”. That is indeed a problem: all embedded quizzing objects (those without an individual timeline) have absolute priority in the stacking (z-order). They are always on top.  I have posted an answer to similar questions in the SWF-past years ago. In this short post, you’ll find a new example output, for HTML5  based on the same trick used before: use an object created on a slide before the quiz slides, time it for the rest of the project with the option ‘always on top’. That object will cover the embedded quiz objects. In the past I used Show/Hide to make it visible, but now of course I took advantage of multistate objects and my favorite shared actions.

Example project

Watch this published project. on any device (rescalable), or the embedded one below (fixed resolution). On the quiz slides you’ll find two extra toggle buttons ‘Info’ and ‘Score’ which can be used to open and close a popup (in reality I change the state of an object).


I used some ready-to-go slides from the project ‘Earth’. I didn’t allow Review, and the score slide is not included. As usual, needed to edit the embedded slides. Several slides have a Pause On Enter, which is never a good idea IMO.

Setup

Multistate objects

Both popups triggered by the extra shape buttons labeled ‘Info’ and ‘Score’ are multistate objects with 2 states:

  1. Normal state is a shape with Alpha = 0 and Stroke = 0. This means it is invisible to the user
  2. State popup exists for both buttons, and has the necessary information to pop up. I used only text, but you can also add images or even event video.. For the Score button I used inserted system variables (cpQuizInfoPointsscored and cpQuizInfoPointsPerQuestionSlide). That way popup will have different values on each quiz slide.

The  multistate content shape objects (SS_Info and SS_Score) are inserted on the second slide ‘Instructions’ which is the slide preceding the first question slide.  This is very important, don't try to do it on the first question slide itself. I added a button Continue to that slide to replace the Pause On Enter. The multistate object timelines start after the pausing point of the button. They are timed for the rest of the project with the option ‘Place object on top’. Since their Normal state makes them invisible to the learner, no need to mess with Show/Hide.

Variables (Boolean)

Two Boolean variables were created, labeled v_info and v_score.  Their default value = 0, corresponding with the Normal state of the two mulitstate content shapes SS_Info and SS_Score.

Shape buttons

On the first quiz slide I created two shape buttons, which have exactly the same look as the Transparent buttons used on the quiz slide (Submit button). These buttons SB_Info and SB_Score are also timed for the rest of the project with the option ‘Place object on top’. In this example Review is not allowed, which avoids the possible overlapping by the Review navigation buttons. Of course it is possible to hide the shape buttons in review mode if necessary. I did take out the pausing point for both Info and Score button. As you can see in the timeline, I moved the slide pausing point towards the end of the quiz slide to avoid waiting after the second step in the Submit process.

Actions and events

Hide buttons On Enter for Exit slide

The buttons SB_Info and SB_Score - timed for the rest of the project -  have to be hidden on that slide, which can be done with a simple action (if you group the buttons) or with a two-command advanced action. It is not necessary to hide the multistate objects. They will always return to their Normal state on each slide, which means they are invisible to the learner.

Success action buttons SB_Info and SB_Score

A conditional action is needed. I preferred a shared action with 4 parameters. I suppose this is an action which can be used in many projects. If you import the shared action into a new project (from an External Library or with the Import functionality), you do not have to create the variables, only multistate content objects. The shared action is derived from this advanced action:

Each of the four parameters is marked  with a color. One of the big advantages of shared actions over advanced actions are the descriptions which explain clearly what you have to choose, see this screenshot which is for the second button SB_Score:


More?

Here are some possible changes or extensions of the idea, which is basically that you need the popups present on the slide BEFORE the first quiz slide and timed for the rest of the project.

  • I used only text in a shape, but the popups can be anything, you can add images, video....
  • With the present setup both popups can be visible at the same time. If you don't like that, add an extra command to the shared action (and a parameter) where you change the state for the 'other' popup back to Normal.
  • You do not like the way popups have to be closed with the same toggle button? It is not possible to add interactive objects to a state, except to the Normal state. You can also insert a hyperlink like an X to the normal state. But that means you have to switch the content filled state (which is Popup at this moment) and the empty state. Bit more work but doable. About using Hyperlinks to trigger actions, have a look at More is in a Hyperlink
  • If you want individual content in the popup, different for each quiz slide, remember you can use a variable to store content. Insert the variable in the content popup and populate it with the On Enter action of the quiz slide.
  • ....


Using Quizzing System Variables

Intro

In my last post I mentioned that, based on the visits to my blog posts, Quizzes in Captivate seem to be one of the stumbling blocks for newbies. Most of the quizzing blog posts with focus on default quiz slides are already pretty old. More recently I have been talking about new features like Branch aware and Knowledge Check Slides. The most visited post will be updated to accommodate the changes in a near future. This article will offer you some ideas about using the specific quizzing category of system variables. If you ever downloaded the full list of system variables, you will have seen that these variables are read-only, at least if you are not a JS expert. As a bonus, you'll find a downloadable list with Quizzing System variables which include my personal comments and links to blog posts where I have used those variables.

This article is an introduction to the use of variables, the use cases are not complicated at all.

Using read-only Variables

Quizzing System variables are read only, but you can use them in two ways, which I will illustrate by a couple of use cases later on:

  1. To show information to the learner, by inserting them in a text container, which can be a shape or a text caption.
    All variables are case sensitive, for that reason I recommend strongly only to insert variables using the X button in the Character part of the Properties panel for the text container. In the dialog box you choose System variables (default is User variables), eventually the category (Quizzing) and pick the correct variable from the dropdown list. It is also possible to limit the number of characters (set to 5 in this screenshot):

    Since text containers including variables have to be generated on runtime, contrary to the static text containers, it is wise to use only websafe fonts which was not the case in the screenshot above.

  2. To use them in an advanced or shared action for multiple goals, like changing navigation, calculation, skipping slides etc.

You will see some use cases for both situations in this article.

Use case 1: add information on question slides

This use case has been explained in an older article (Buttons on question/score slide), but here you'll see a refurbished version using new features which have appeared since that old version: hyperlink, multistate object, shared action, toggle command.

The idea is to insert system variables in a text container that appears on the first question slide, is timed for the rest of the project, always on top. Since all embedded quiz objects have priority in the stacking order (z-order, order of the layers in the timeline), you have to make sure that the custom text container is not covered up by embedded objects. For that reason I edited the size of feedback messages on the quizzing master slide, to make room for the (green) text container:

This text container can remain permanently on the question slides, always available, or you can use a shape button to trigger its appearance. That button is visible in the screenshot as a green button with the label 'i'. It is also inserted on the first question slide, timed for the rest of the project. This shape button has an extra custom state 'Close', visible on the next screenshot, to turn it into a real toggle button. The action used for this shape button is the shared action described in '1 action = 5 toggle buttons', and a user variable v_visib is used in that action.

You see the inserted system variables cpQuizInfoPointsscored, cpQuizInfoPointsPerQuestionSlide and cpQuizInfoNegativePointsOnCurrentQuestionSlide. The result on runtime, when the toggle button has opened the info text can be seen in this screenshot:

To be sure that the information is closed by default On Enter for each question slide, I used an On Enter action for each question slide, which will be shown in use cas 3


Use case 2: Custom Score slide

You can turn on/off fields in the default Score slide, but you can also replace the inserted fields by your text and system/user variables. Look at this example in editing mode:

You see again a lot of embedded system quizzing variables: cpQuizInfoPointsscored, cpInfoPercentage, cpQuizInfoTotalQuizPoints,  cpQuizInfoTotalCorrectAnswers  and cpQuizInfoTotalQuestionsPerProject. Moreover there is one added user variable v_penalty, which I'll explain in use case 3.

On runtime it will look like this screenshot:

This score slide is taken from the same example file. Since both the text information container and its toggle button were timed for the rest of the project, you have to take care of hiding both On Enter for this score slide. I used this standard advanced action:


Use case 3: Calculation total Penalty

Although there is a system variable (with a very long name) cpQuizInfoNegativePointsOnCurrentQuestionSlide, no exposed system variable is available containing the total penalty of the quiz, which is the opposite of the maximum number of points , cpQuizInfoTotalQuizPoints. If the user misses all answers, he'll get a negative score equal to that total penalty. Since it is not available as an exposed quizzing variable, I will have to calculate it.

For that purpose I created a user variable v_penalty with a start value of 0. The On Enter event of each question slides was used to trigger this standard advanced action (shared action had no sense because same action is valid for each question slide):

The first 3 commands take care of resetting the toggle button (SB_Info with the variable v_visib) and hiding the text information container (Tx_Info).

The Expression command is using cpQuizInfoNegativePointsOnCurrentQuestionSlide to calculate the present amount of v_penalty. It may seem confusing that I'm using '+' as mathematical operator: reason is that the system variable always shows a negative number. You don't have to believe me: have a look at the second screenshot in use case 1. 

More use cases - download

I wanted to keep it simple in the described use cases, introduction to the use of variables. Download the pdf with description of all quizzing system variables from this link

The table has 6 columns:

  • Variable name
  • Variable type: a variable can be empty, a Boolean (only values are 0/1 or T/F), a number, text or undefined.
  • Explanation which is sometimes bit different from the explanation found in the Variables dialog box
  • Default value
  • Comments: my personal comments
  • Blog posts: here you'll find quite a lot more use cases, I mention the blog posts where the referenced variable has been used

In this screenshot you see part of the first page:

Conclusion

I'm waiting for your comments. Do you see ways of using those system variables in your projects? Do you have questions, use cases that you cannot figure out if they are possible? Fire away.