remedialPageName of selection = ""
where Put the following handlers in the script of the book, so that all the widgets in the book can share them:
-- override scoring and normalize to 1 or 0 for partially correct
to get ASYM_WID_Score mode
if ASYM_WID_QType of target is in "MULTICHOICE,TRUEFALSE"
mode = "decimal,2"
forward
if it < 1 -- if *anything* is incorrect
get 0
end
return it
else
forward -- let the scoring engine do what it wants
return it
end
end
-- override playback method
to handle ASYM_PlayFeedback
if ASYM_WID_QType of target is in "MULTICHOICE,TRUEFALSE"
send ASYM_CheckTries target
get ASYM_WID_Score( "decimal,2") of target
if it = ASYM_WID_MaxScore of target
send CustomFeedback("Correct") -- see handler below
send next
else
send CustomFeedback("Incorrect")
get ASYM_WID_TriesMax of target
if it > 0 and ASYM_WID_TriesUsed of target = it
send next
else
-- Check for a user property containing a page name
get RemedialPageName of target
if it <> null
get ASYM_PopupPage(page it, "shadowAutoClose")
end
end
end
else
forward -- normal playback behavior
end
end
to handle CustomFeedback what
conditions
when what is "Correct"
get "correct.wav"
when what is "Incorrect"
get "wrong.wav"
else
get false
end
if it <> false
-- by default, look for .wav file in path of book
get ASYM_PathOfFile(name of this book) & it
get PlaySound(it) -- much faster than playing a clip
end
if it is false
-- if for some reason sound could not play, show text
get ASYM_ModalPopText(what, null, sysMousePosition)
end
end
Make sure that you download and run the CBT patch (cbtpatch.exe which is a
self-extracting archive on the asymetrix ftp site.) to avoid memory leaks
when popping up those pages.
--- Claude Ostyn, Asymetrixbrianp@son.washington.edu