Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Javascript to update quiz score

Explorer ,
Feb 03, 2016 Feb 03, 2016

Here's what I'm trying to do:

Using regular slides, I've built a pre-test for my course that allows the learner to demonstrate proficiency in the courses objectives and skip over those portions that they already know.  I'm accomplishing this by having the button for the correct answer update a variable for the associated objective.  I've also set this up for the test, which I used quiz slides for, so that the learner would skip over questions they've already demonstrated proficiency in.  To get a final test score, the correct pre-test questions also update the quiz score.  The problem is, that this means I could end up with scores over 100.

Here's what I'd like to know.  I want to use the variable to make a decision about whether or not to give quiz credit based on whether or not they demonstrate proficiency.  Example, if they learner has to get 6 or 8 questions corrected, I'd like to build an advanced action that says    If <variable> is equal to or great than 6, the multiply <variable> by 5 and add to quiz score.  This way, if the learner doesn't demo proficiency in an objective, they don't get any credit for the pre-test answer for that objective.

I'm thinking that I need to use JavaScript to make this happen, but any suggestions would be greatly appreciated.

v/r

Jay

726
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 04, 2016 Feb 04, 2016

It may be possible with JS (normally quizzing system variables are read-only). As a workaround, did you try to use the Branch Aware feature?

Branch Aware Quiz - Captivate blog

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 04, 2016 Feb 04, 2016

Good morning!

I do have the branching aware set, but I've got a bunch of problems at the moment.

I've got the pre-test built as described above....as I go through them I've put quizinfopointscored (? early in the AM and doing this from memory) variable on each page and I can see that the score is updating as I go.  However, when I get to the "results" page for the Captivate quiz, it shows the score as 0.

I'm sure there is something simple that I'm missing in 9....I had this working fine in 7.

Can I ask....the "branching aware" function only counts the questions that the learner actually answers, is that correct?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 04, 2016 Feb 04, 2016
LATEST

Yes to your last question.

The variable is cpQuizInfoPointsscored (also from memory).

Did you edit the score slide? Did you change anything, or delete one of the embedded objects (Continue button is crucial)?

How did you test? After publishing or using Preview in Browser (eventually Preview HTML in Browser)?

As far as I'm aware of it, nothing changed about Branch aware in Captivate 9. There were quiz enhancements (like the Next/Back special buttons for Review mode and the Knowledge Check slides). Is this an upgraded project?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources