Skip to main content
Andre Paz Leal
Inspiring
November 25, 2013
Question

Variable to check Number of Attempt

  • November 25, 2013
  • 1 reply
  • 1219 views

So here I am with another JS question.

I would like to make an "clickometer", so each time the user click or press the option that isnt the right one it visually, increment a graphic element on the course.

Captivate 7 give me the "cpQuizInfoMaxAttemptsOnCurrentQuestion" variable, but how can i check how many times the user click, that value isn´t storage in any other variable that I´ve tried, tried with "cpQuizInfoNegativePointsOnCurrentQuestionSlide" to see if I could minus the cpQuizInfoMaxAttemptsOnCurrentQuestion with, but no success.

I can trace "cpQuizInfoTotalCorrectAnswers" but it returns the total project value and not by slide.


console.log('quiz info attempt: '+cpQuizInfoAttempts);

console.log('attempts max: '+cpQuizInfoMaxAttemptsOnCurrentQuestion);

If I can´t perpaps find the solution, I would have to create a listener above the slide element the trace´s each click, tha´ts ok, but trace each key that is pressed, that´s were the problem live.

Thank you all.

This topic has been closed for replies.

1 reply

Lilybiri
Legend
November 25, 2013

Why not create a user variable to track the clicks? For this answer I'll label it v_wrong. And you add the statement 'Increment v_wrong with 1' (hope you installed the patch, that adds this new statement to the list for advanced actions: http://blog.lilybiri.com/new-features-in-captivate-7-dot-01). You didn't explain exactly what 'increment a graphic element on the course' means? Could you perhaps add a screenshot?

The system variables you are pointing to will not help you for this goal. And if you really look for a JavaScript solution, not for an advanced action solution, will leave it to someone else.

Lilybiri

Andre Paz Leal
Inspiring
November 25, 2013

It´s simple as this, a screen where the user must guess the right click location, each time the user clicks on the wrong place, increment the green bar below.

Lilybiri
Legend
November 25, 2013

Maybe it will be easier with Javascript, it can be done with advanced actions as well. But you'll need the user variable anyway.