August 25, 2009
Conditional statments in Advanced Actions..the stint continues…!
August 25, 2009
Conditional statments in Advanced Actions..the stint continues…!


You are creating a quiz in your e-learning project in Adobe Captivate. You intend to grant grades(such as A, B,C) to students based on the percentage scored by a student out of total score.

This was the use-case I had thrown in my last post. In my last post you learnt how to create an advanced action and add assignment & standard action statments to an advanced action. If you are still wondering as in how to implement above use-case using assignment and standard actions only, then well let me tell you that you would not be alone. You cannot implement the above use-case by just using assignment and standard actions. You would need something more. You need conditional statements in your advanced action. And this post aims to help you with that.

In this post I would show you as to how the above use-case can be achieved comprehensively using advanced actions.

Follow the following steps to achieve this use-case;

  1. Create three user-variables:
    1. Total  – to store the total marks in a quiz.
    2.  Scored – to store the actual marks scored by a student taking the quiz.
    3. Result – to store the final percentage.
    4. Grade – to store the final grade obtained by the student. This post tells you how to create user variables in Adobe Captivate.
  2. Create an Advanced action: sc1.

After storing the relevant values in appropriate variables, calculate the percentage of marks scored by the student. That would look like : (Scored/Total) X 100.

So your ‘Result’ variable stores the percentage of marks scored by a student. Now you need to assign different grades based on the percentage of marks scored by the student. Say:

Grade A – %age > 80

Grade B – 60< %age <=80

Grade C – %age <=60.


After adding condition to check if the percentage is greater than 80, you need to add new conditions to assign Grade B and Grade C. Remember that you cannot include a condition statement inside a condition statement.

Now in order to assign Grade B, you need to check whether the percentage lies between 60% and 80%. For this we would need an ‘AND’ operation.

After you have your advanced action in place, you could execute this advanced action on the Slide enter action of any slide(after the quiz results slide) which displays the variable grade(say in a text caption).

Hope by now, you would have got a good understanding of variables and advanced actions. All the ground work for variables and advanced actions is done by this post… you should be ready to fly now. If you have any queries do drop me a line… Cheers!!


2011-01-19 00:57:11
2011-01-19 00:57:11

Hi Manish-
This post was very helpful but I had a couple questions about it. I am creating a quiz in Captivate 4 that will be loaded on a website and I want to be able to have the results tracked and reported to the same website (non-LMS). If the user passes the test, I want them to go to one page, and if they fail, I want them to go to another. I followed everything you mentioned above. The only difference is that I have 2 conditions (Pass or Fail) instead of the 3 you have. I’m able to get the quiz to open a designated URL at the end of the quiz, but I’m unable to get the results of the quiz to show on that URL.

Basically, I’m looking to accomplish the same result that is discussed in this article , more preceisely the “Accessing the data” section . I know that article refers to Captivate 3 and I thought I was very close in accomplishing the same thing in Captivate 4 when I was pointed to your article. Am I missing something? What steps would you take?


2009-08-26 13:29:08
2009-08-26 13:29:08

You’re website has very good infos. I learned very a lot from reading these.

Add Comment