Skip navigation
Currently Being Moderated

Adding up scores in text area with variable

May 18, 2012 9:20 AM

Hi,

 

I am creating a form of quiz that doesn't use the standard Adobe Captivate (5.5) quiz slides. I am getting the learner to self-mark and enter the score into a text entry box in a TextAreaWithVariable. The scores are then displayed on the final page in the corresponding TextAreaWithVariable text box.

 

I would like Captivate to add up the scores on this final page. I read somewhere that you use Advance Actions so when the learner enters the page it triggers the calculation using the Expression action. The problem is that that when setting up the action, it doesn't recognise the three TextAreaWithVariables on the page. They are all named but the action does not pick them up.

 

Could anyone please let me know where I am going wrong here.

 

Many thanks,

 

Nick

 
Replies
  • Currently Being Moderated
    May 18, 2012 9:34 AM   in reply to Nick H Fisher

    Hi Nick,

     

    I have been blogging about using the TextArea with Variables  by Jim:

    Extended functionality

     

    In the article referenced to in this post you'll find the explanations in detail for the advanced actions that I used.

     

    But I'm a bit afraid that I need some more information:

    • you have one TextArea, with its associated variable on one page and this variable gets its value (a score) by the user
    • how many of those slides do you have?
    • but then you are talking about multiple scores that you want to summarize into a total variable to be displayed in another TextArea widget at the last slide.

     

    How do you trigger the advanced actions to calculate the sum? I would propose that you use the On Enter action of each slide after the first question slide to calculate the temporary sum. Trying to explain:

    1. Score of first question slide is entered by user, and stored in variable v_quest1
    2. On entering the second question slide create this standard advanced action to be triggered by the On Enter action of this slide
      • Expression v_sum = v_sum + v_quest1
      • Continue
    3. On entering the third question slide create a similar action with the score stored in v_quest2
      • Expression v_sum = v_sum + v_quest2
      • Continue
    4. When entering the score slide you have the last of this similar advanced actions to trigger and the final result will be in v_sum

     

    If you do not need to keep the individual scores of each question, you could even re-use only one variable v_quest that would be associated with all the widgets except the one on the score slide and you could reuse the advanced action on each slide without editing.


    Lilybiri

     
    |
    Mark as:
  • Currently Being Moderated
    May 18, 2012 2:08 PM   in reply to Nick H Fisher

    I understood that you used also the TextArea enhanced widget from Jim Leichliter there? You cannot control what is showed in a TEB, you'll need to have the variable widget from Jim for that. But why do you use a TEB to show a result?

     

    Lilybiri

     
    |
    Mark as:
  • Currently Being Moderated
    May 19, 2012 12:22 AM   in reply to Nick H Fisher

    Hi Nick,

     

    We live in different time zones, was sleeping when you asked last question. But this is wonderful: now you figured it out alone and think it will never be forgotten.


    Perhaps have a look at my two articles about using variables:

    http://kb2.adobe.com/community/publishing/862/cpsid_86299.html

    http://kb2.adobe.com/community/publishing/871/cpsid_87182.html

     

    Lilybiri

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points