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)?

Use Hyperlinks as Interactive Object.

Intro

Quite a while ago i have blogged about using Hyperlinks as interactive objects. Those blogs included examples. However the articles were written in the SWF era… which is almost over.  I'm talking about these posts::

More is in a hyperlink – Dropdown menu

More is in a hyperlink – Close button

Later on I used the Dropdown menu workflow in all the interactive videos which I posted here, to create a Bookmark menu. Here is one example: Custom Play/Pause button

Last week, a user asked questions about the same topic. That was the incentive to check out if the described workflows for SWF output were still valid for HTML5 output. 

Example file

You can have a look at this example file, where I show 4 use cases; or watch the embedded version below (fixed resolution, whereas the link goes to a rescalable HTML output):
  • Navigation buttons
  • Show/Hide workflow
  • Close button for a popup
  • Forced view

I did keep the typical Underline for the hyperlinks (but often edited the color). You will find tons of them. The design of the slides was taken from the Quick Start Project included with version 11.5, labeled ‘Rhapsody’. It always reminds me of the epoch of the Hippies…

No audio, sorry.  There is no playbar, nor TOC. Navigation is done with SVGs, which have a tooltip (added in the Rollover state) for those who use a desktop/laptop. It is a rescalable, non-responsive project. I  checked  out the workflows in a Fluid Boxes project as well, because they may be very interesting for that type of project.


Setup

Navigation menu

The list with commands which you can open when clicking the down arrow next to the field 'Web page' looks shorter than the Simple Actions list under the Actions tab for an interactive object:

Some commands are indeed missing, but most Slide commands can be found under the unique 'Slide' command. In this screenshot you see how to translate the Jump to Slide command, which you'll need to create navigation buttons (see Menu slide, second slide in the example project):

Comparing with interactive objects

The big advantage of using hyperlinks is that everything could be done with one text container, in which you mark several items as hyperlinks . Great way for a custom Table of Contents, which you can have sliding in/out. Especially for responsive projects: click box over text is not possible in a normal fluid box; limiting number of objects make setup much easier for Fluid Boxes workflow as well as for Breakpoint Views.

Alternative for buttons? Advantage is that you don't have shrinking of the text when pressed, you don't have to configure InBuilt states. Disadvantage: you miss the Visited state to indicate that an item has been visited.

Show/Hide

The slide with the hyperlinks in ellipses, was created as a 'dynamic' hyperlink (to be compared with Dynamic buttons). Text in the ellips are user variables, used as hyperlink. 

The user variables v_fx and v_KC  have a default value of 'Show', while the text shapes with the info are hidden with the On Enter action of the slide. A simple conditional action (similar for both) is used:

It would also be possible to have all the info boxes in one multistate object (which I use in the next two use cases).

Comparing with interactive objects

Similar to the navigation solution, if you don't like shrinking nor styling of InBuilt states this could be a solution. Again, since a Visited state is missing, that can be a drawback.

Another drawback is that you cannot use shared actions, which I would have done in this case. You need to use duplicate advanced actions.

Close button

Normally it is not possible to add an interactive object to a state in a multi-state object. You cannot create a hyperlink neither. However it is possible to have the same hyperlink available in all states, with the same triggered action. On the Close Box - slide, The info multi-state object is a shape with 6 states. Here is a screenshot:

Just FYI, the second state (QSP) looks different in the Object State panel, but that is just a  glitch. It is exactly the same on the state. To create this multistate object you need to follow carefully this workflow:

  • Create the shape (Tx_Info is the label I used) with a close hyperlink (big X), which I aligned to the bottom, centered. That will become the Normal state. You need to choose a command, but will have to edit that command later on. 
  • Go into the Object State panel and duplicate the state, the X hyperlink will be included in this second state.
  • Close the Object State panel and edit the hyperlink. It need to be 'Change state of Tx_Info to Normal'. 
  • Change the color of the X character to a color from the background, so that it will be invisible; if there is a Fill and/or a stroke, set Alpha and Stroke both to 0. The Normal state will now seem 'invisible'.
  • Return to the Object State panel.
  • Select the second state, style the X hyoerlink to a visible color. Add the necessary text and/or background fill.  Double check by previewing if the hyperlink action is functional.
  • Duplicate the second state, and edit the text/fill
  • Continue the duplication until you have all needed states.

I have tried with Hide for the hyperlink, but had lot of issues, seemed not to be functional. That is the reason why I switched to an invisible Normal state.

In the ellipses you find more hyperlinks. They change the multi-state object to the appropriate state. Here is an example for the first category 'QSP':

Comparing with interactive objects

As far as I know this is the only way to have an action propagating to other states in a multi-state object. Shared actions are not possible nor are Visited States (although with a more complicated advanced action possible).

The action triggered by the hyperlink can be rather complicated. A not so complicated example follows

Forced View

Setup of the multi-state object is quite the same as in the previous slide. In this case the change of state is triggered by real 'buttons', which seemed logical with this content. That also allowed me to use a Shared action. To track the clicks, a user variable is needed for each of the buttons. The shared action is visible in these two screenshots:

The X hyperlink, which was propagated to all states, triggers an advanced action with two decisions. The Back to Menu button is hidden with the On Enter event of the slide, and made visible when all variables have been toggled to 1. That meant that they all have been clicked: