HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Using number of attempts to create feedback messages
Using number of attempts to create feedback messages
  View type:
Hi,

I'd like to use the number of attempts to create feedback message boxes, i.e. if a user failes a question, some useful hints should be provided in a popup window.

Could anyone please tell me, how to create popup windows on the fly (creating this object with a provided text; it should be invisible until the question is failed) and how to read the number of attempts? Do I have to declare some java script variables or can I use something predefined?
I know that it's possible to create message boxes to give these hints, but it would be really nice if I could use a popup window.

Many thanks in advance!
 
Hi, Ridcully,

in this case you can create separate objects (i.e. textboxes) with differebt texts for each attempt. Do not display them by default.
Every question and test objects have onAttempt event (and also some other useful events) and attemptsLast property (look at Help on particular question object to get more info). Simple action sequence can be attached to this event:
IF ($OBJ_ID.attemptsLast==3)
_ DISPLAY (some textbox for 3 attempts)
IF ($OBJ_ID.attemptsLast==2)
_ DISPLAY (some textbox for 2 attempts)
and so on.
OBJ_ID must be real current question object id.
 
 
Thank you, this works great [:)]
Subject:
Message options
No additional options