Subject: MTB30 CBT QUESTION WIDGETS

On September 16, Geoff Pearson wrote a plea for a "standard" behavior for question widgets. This is very good input and we will certainly considering in the next iteration of the product. Unfortunately, as far as we could determine there is no such thing as such a worldwide "standard", especially in the type of rich behavior that was requested. In the meantime, there is a way to get exactly the desired behavior with a minimum amount of scripting. To verify that I understood the spec correctly, here is a summary:

OK, here we go. You can override just about any behavior with custom scripts. Here is what needs to be done: Set the feedback of the questions to nothing at all, and uncheck the "Provide feedback immediately" option. Set the number of tries to anything you want. Give each answer a weight that should add up to 100% for all correct answers, and give the wrong answer a negative weight. With the multiple choice widget selected, type in the following in the command window

    remedialPageName of selection = ""
where is the name of the page to pop up for an incorrect answer. Of course, such a page must exist. Set the action of the "Check response" widget to trigger the object's feedback.

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, Asymetrix
brianp@son.washington.edu
University of Washington
Box 357260
Seattle, WA 98195-7260
206/543-9175