Accessibility
Adobe
Sign in Privacy My Adobe

Community Publishing

Created:
2010-07-29
Last Updated:
2010-08-13
by
User Level:
Intermediate/Advanced
Products:
Adobe Captivate

Need more tips and tutorials?


Question slide with partial scores and customized feedback (CP5)

StartFile (zipped)


Goal

Up till now Captivate doesn't allow to attribute a partial score to a question that is partially correct. In this tip a Hotspot question will be constructed, with partial scoring. Same principles can be used p.e. for Multiple Choice questions, Fill-in-the-Blank questions with multiple blanks, Matching questions. Before showing the score, a customized feedback, including the given 'wrong' and 'correct' answers will appear. 

Sample SWF

Play this SWF for better understanding the workflow. There is only one hotspot question, with 9 possible 'hotspots' over the City names in Belgium (Brussel, Brugge, Gent, Antwerpen, Hasselt, Mons, Liège, Namur, Arlon). You'll see the Hand cursor over the hit areas. For each correct click the score is incremented with 5 points, for each incorrect click it is decremented with 5 points. When submitted, you will be directed to either the feedback for a totally correct answer, either to slides where you'll see the correct and incorrect answers marked. At the end the score will be visible. One master slide is used that has a Rectangle showing the slide label. Did you know that a Rectangle can have a Text?

 Variables to be created

  • For the total score of the Question slide a variable that will be initialized to 0 on (re-) entering the Question slide: v_score
  • For the percentage, to be calculated from the score: v_percent
  • For the maximum score possible, with a value = 20: v_max
  • for storing the click on the hotspots, 9 variables: v_Antwerp, v_Arlon, v_Brugge, v_Brussel, v_Gent, v_Hasselt, v_Liege, v_Mons, v_Namur; those variables can have the values 0 or 1 and are initialized to 0 on (re-)entering the Question slide

Slides and objects on slides

After the intro-slide (self-explanatory) you'll find sequentially the following slides:

Slide 2: QuestionSlide

On entering this slide the Advanced action 'Init' will be triggered. On this slide the objects are:

  • Image (map) covers up the whole slide, that is why I activated the option 'Master Slide Objects on Top'
  • Text Caption with the question (Style 'Transparent')
  • 9 Click boxes over the city names, labeled CB_WestVlaanderen, CB_OostVlaanderen, CB_Antwerpen, CB_Limburg, CB_Brabant, CB_Hainaut, CB_Liege, CB_Namur, CB_Luxembourg; each of those Click boxes will trigger an Advanced action on Success
  • Text button to Submit the answers
Slide 3: Correct

This slide has several Text Captions (Transparent) and the Text button 'Score' with the Succes action 'Jump to slide 6 Score'.

Slide 4: Incorrect1

On entering this slide the Advanced action 'InitIncorrect1' will be triggered. On this slide the objects are:

  • Transparent Text Captions for title and the four correct cities
  • 8 images to function as markers for correct/incorrect answers; those images are labeled NoAntwerp, NoBrugge, NoGent, NoHasselt, YesAntwerp, YesBrugge, YesGent, YesHasselt; those images will be hidden by the Advanced action 'InitIncorrect1' on entering this slide
  • Text button 'Check my answers' that will trigger the Advanced action 'EnterIncorrect1'
  • Text button 'Next' that will jump to the next slide
Slide 5: Incorrect2

On entering this slide the Advanced action 'InitIncorrect2' will be triggered. On this slide the objects are:

  • Transparent Text Captions for title and the five incorrect cities
  • 10 images to function as markers for correct/incorrect answers; those images are labeled NoArlon, NoBrussel, NoMons, NoLiege, NoNamur, YesArlon, YesBrussel, YesMonst, YesLiege, YesNamur; those images will be hidden by the Advanced action 'InitIncorrect2' on entering this slide
  • Text button 'Check my answers' that will trigger the Advanced action 'EnterIncorrect2'
  • Text button 'Next' that will jump to the next slide
Slide 6: Score

On entering this slide the Advanced action 'EnterScore' will be triggered. On this slide the objects are:

  • Text Caption that shows the score and includes the variable v_score
  • Text Caption that shows the maximum score and includes the variable v_max
  • Text Caption that shows the percentage  and includes the variable v_percent

Advanced actions

Init (standard action) to be triggered on entering slide 2 'QuestionSlide'

This is a very simple action that resets the variables, associated with the click boxes to 0. This is necessary because the user can retry the question. The score variable is also reset to the value 0. Because the percentage variable is always calculated from the score variable, it is not necessary to re-initialize that variable.

 Adv. action Initi

 
InitIncorrect1/InitIncorrect2 (standard action) to be triggered on entering slides 4/5

To create the possibility for the user to retry the question, the markers (correct/incorrect images) on these slides have to be hidden when entering them. Omitting this, you could end up with two different markers on top of each other.
You see a screenshot of the Advanced action 'InitIncorrect1'. For the second (InitIncorrect2) I started with a duplicate of the first, and changed the image labels.

 

 Adv. action 'InitCorrect1' 

 

CB_Antwerpen, CB_Namur,..... (conditional actions) to be triggered by the Click boxes (hotspots) on slide 2 (QuestionSlide)

Those nine conditional actions are very similar, although 4 out of the 9 increment the score, and 5 decrement the score. I did use the duplicate functionality a lot of times:

Duplicate Advanced action

Each of the nine Conditional actions has only one condition. The screenshots below show the Conditional action for the Click box CB_Antwerpen which leads to an incrementing of the score. 

The condition is necessary, because it is possible that the user already clicked the same hotspot. In that case the associated variable (here v_Antwerpen) will be different from 0, and the ELSE action will be executed. This action rewinds the timeline. 

If the click box hasn't been clicked yet, following actions are executed:

  1. incrementing the score
  2. changing the variable v_Antwerpen to 1 (was 0)
  3. rewinding the timeline

CB_Antwerpen IF, THEN

CB_Antwerpen ELSE

A similar action has to be created for the Click boxes CB_Limburg, CB_OostVlaanderen en CB_WestVlaanderen. I used the same labels as name for the advanced actions.

The other Click boxes, CB_Brabant, CB_Hainaut, CB_Liege, CB_Namur, CB_Luxembourg will trigger a similar Advanced action, but with decrementing the score. Here is an example (ELSE is the same as for CB_Antwerpen):

Adv. action CB_Namur

 

EnterIncorrect1/EnterIncorrect2 (conditional actions) to be triggered by the button 'Check my answers' on slides 4/5

Those conditional actions will mark the answers as correct/incorrect by showing the appropriate images. The advanced action EnterIncorrect1 has 4 similar conditions (Brugge, Gent, Antwerpen, Hasselt), because there are 4 answers on this slide, EnterIncorrect2 has 5 similar conditions (Mons, Liege, Namur, Luxembourg, Brabant) . Here are the screenshots for the condition Brugge; the condition is really simple.

EnterIncorrect1_IF

EnterIncorrect_Else

 
EnterScore (standard action) to be triggered on entering slide 6 (Score)

This action calculates the percentage:

EnterScore

 

Start File

For those who want to try out the scripting of this tutorial, I included a Start File. In this file you'll find all the slides and objects as described. The variables are created and the normal navigation. You will have to create the Advanced actions and attribute them to the proper events. Success!

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License