Copy link to clipboard
Copied
I have an assessment (contains 9 questions) in my project that contains 3 lessons. Each question relates to a specific lesson. On my Quiz results slide, instead of displaying the total score for the entire assessment, I want to break the score out into lessons so that the learner knows which lessons require additional study. I have created a variable to hold the points scored on each question, and assigning the points to that variable using 'QuizInfoLastPointsScored'
I know which questions relate to which lesson:
Lesson 1: questions 1-3
Lesson 2: questions 4-6
Lesson 3: questions 7-9
However, I do not know how to add 3 variables together to get the combined total for that lesson. The 'Expression' action only allows me to combine 2 variables:
How do I add a third variable into the 'Expression' action?
I thought you did need three totals: one global and two partial totals. This last one will not calculate the partial totals. There is no need whatsoever to put first the score in a separate variable at all. I only used variables for the three totals. You will only calculate the global total, and that could be with one statement, no need for two at all:
Expression v_total = v_total + cpQuizInfoLastSlidePointScored
Copy link to clipboard
Copied
Add another expression... allQuestions = L1_1and2 + question3
Copy link to clipboard
Copied
I tried this but couldn't get it working:
Is that what you mean?
Copy link to clipboard
Copied
Yes, what is the result? How are you populating the question# variables?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
What is the result that is showing?
Copy link to clipboard
Copied
Nothing just blank
Copy link to clipboard
Copied
How are you triggering the advanced actions?
Copy link to clipboard
Copied
Each advanced/shared action needs an event to trigger. In this case I would use the On Enter event of the Score slide.
However: since Accuracy is showing 0%, which is a quizzing system variable, cpInfoPercentage, that is calculated from the system variable cpQuizInfoPointsscored and the maximum possible score cpQuizInfoTotalQuizPoints, it looks like you never answered any question correctly? That means that after each question the var cpQuizInfoLastSlidePointScored was zero, and there is nothing added to the user variables that "LessonXTotal". Zero is interpreted by CP as empty...hence nothing can show up in those user variables. Or did you change the field after Accuracy?
Have a look at:
Intermediate Score Slides - Captivate blog
Copy link to clipboard
Copied
Unfortunately when I do get answers correct the total still shows as blank:
It appears that my question points variable is being tracked correctly; however, the expression is not adding the two variables together.
Copy link to clipboard
Copied
I think your issue is that the variable gets reset very quickly and you can't capture it. I know in CP7 and swf it was all but impossile to use the cpQuizInfoLastSlidePointScored.
Are you using SWF or HTML5 or both?
I think it's possible to set up variable change listeners to write the responses to an array and get the info you need.
Copy link to clipboard
Copied
SWF only
On Fri, Mar 27, 2015 at 9:02 PM, TLCMediaDesign <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Like Lieve asked can you tell us how you are triggering the action to put the cpQuizInfoLastSlidePointScored into your custom variable?
Copy link to clipboard
Copied
David, used to be ignored totally for some reason. He never answered my questions.
Copy link to clipboard
Copied
Sorry about that! I've been out of town for the weekend...I have a deadline on another project this morning but after that I will take more screenshots and explain my workflow. Sorry again not trying to ignore you!
Copy link to clipboard
Copied
Hi there, sorry again for the delayed response, I appreciate both of your help on this issue!
After each of the question slides in my assessment, I have a blank slide with a short duration that saves the points scored on the previous question to a variable:
I set the 'On Enter' action of my Quiz Results slide to combine the variables for question 1 & 2, and then a second variable for question 3 & 4. In the third expression, I add these two variables together to get a 'Lesson Total' score:
On my Quiz Results slide I display all the variables to see if my actions are set up correctly:
What I found is that my 'points scored per question' variables are working correctly; however, the other variables are not. Please let me know if I can provide any additional information that would be helpful!
Copy link to clipboard
Copied
I don't see what is wrong. I set one up and it works for me.
Copy link to clipboard
Copied
darn.... ok thanks, I guess I can try creating a new project and starting again to see if it's something wrong with the project.
Copy link to clipboard
Copied
I'd try a simple project with just the quiz slide and keep adding to it for testing before you bail on your current project.
Copy link to clipboard
Copied
Good idea. Thanks again, it helps to know that the actions are set
correctly!
On Mon, Mar 30, 2015 at 2:23 PM, TLCMediaDesign <forums_noreply@adobe.com>
Copy link to clipboard
Copied
You do create much more variables then needed IMO and that will increment the risk of having the same label used for something else. Captivate doesn't like when a label has been used twice, even for totally different object/decisions/variables/actions.
I would have used one variable v_first for the first total score, a second one v_second for the second total score and a last one for the great total v_total
No need for those extra short slides, just fire the advanced (or better shared action) On Enter of the next question slide:
Expression v_first = v_first + cpQuizInfoLastSlidePointScored
Expression v_total = v_total + cpQuizInfoLastSlidePointScored
Continue
If you use a shared action, create only a parameter for v_first, you can replace it by v_second for the two other questions.
You probably will need to run this action a last time on Enter of the Score slide, no need to total here, since the 3 variables will have the correct score.
By using an identifying character at the beginning of a name, the bad chance to have a duplicate name will be a lot less.
Copy link to clipboard
Copied
Thanks! I'm having a hard time implementing this... did you say you have a blog post I can reference that does something similar?
Copy link to clipboard
Copied
Not for CP8, pointed you already to Intermediate Score Slides - Captivate blog
Now in CP8 I would definitely choose for shared actions. Parameters in Shared Actions - Captivate 7 vs. 8 - Captivate blog
Copy link to clipboard
Copied
Ok thanks, after reviewing this I got another idea ... wouldn't something simple like this do the job?
Copy link to clipboard
Copied
I thought you did need three totals: one global and two partial totals. This last one will not calculate the partial totals. There is no need whatsoever to put first the score in a separate variable at all. I only used variables for the three totals. You will only calculate the global total, and that could be with one statement, no need for two at all:
Expression v_total = v_total + cpQuizInfoLastSlidePointScored