--HANDLER TO CHECK IF THE COMBINATION OF ANSWERS SELECTED IS CORRECT --DOES CHECKING USING IF STATEMENT, TWO OTHER HANDLERS CHECK NUMBER OF --OF TRIES, AND WRITE ANSWER TO LOG FILE. --WRITTEN 15/9/95 IAN WALLACE. CHANGE ONLY FIRST IF STATEMENT AND --CLIP & VIEWER REFERENCES to handle buttonclick system s_ASYM_LogType,s_ASYM_LogAnswers -- CHANGE THE COMBINATIONS BELOW TO CORRESPOND TO THE QUESTION ANSWERS -- CHECKED IS TRUE IF ANSWER IS CORRECT. BUTTONS NAMES DEFAULT TO 1,2,ETC AUTOMATICALLY if checked of button"1" = false and checked of button"2" = true and \ checked of button"3" = true and checked of button"4" = false then --IF YOU NEED MORE...ADD THESE. --and checked of button"5" = false and checked of button"6" = false -- IF THE ANSWER IS TRUE objList = my ASYM_WID_TargetObject if objList = "" objList = ASYM_CollectWidgets(this page) end step i from 1 to itemcount(objList) pop objList into obj if obj <> self and isObject(obj) and ASYM_WID_QType of obj <> NULL if obj = NULL obj = target end if s_ASYM_LogAnswers is true if ASYM_WID_QType of obj <> NULL if s_ASYM_LogType is "ResponseData" txt = name of obj & tab & "ShowScore!" & tab & quote & ASYM_WID_Responses() of obj & quote & CRLF else get ASYM_QuestionStatus of obj txt = "Q=" & name of obj && ": E=Show Score : S=" & items 2 to itemCount(it) of it end else txt = "Q=" & name of obj && ": E=Show Score : S=" & score end get ASYM_LogWriteEntry(txt) end end end show viewer "correct" pause 2 seconds close viewer "correct" go to next page break buttonclick end -- IF THE ANSWER IS FALSE objList = my ASYM_WID_TargetObject if objList = "" objList = ASYM_CollectWidgets(this page) end step i from 1 to itemcount(objList) pop objList into obj if obj <> self and isObject(obj) and ASYM_WID_QType of obj <> NULL if obj = NULL obj = target end send ASYM_CheckTrys target, obj end end if ASYM_WID_TriesMax of obj <> 0 and ASYM_WID_TriesUsed of obj >= ASYM_WID_TriesMax of obj then show viewer "bummer" pause 2 seconds close viewer "bummer" send next else show viewer "incorrect" pause 2 seconds close viewer "incorrect" go to page "fb_q2" end if end -- HANDLER TO WRITE SCORES TO LOG FILE to handle ASYM_ShowTheScore obj, score, mode system s_ASYM_LogType,s_ASYM_LogAnswers if obj = NULL obj = target end if s_ASYM_LogAnswers is true if ASYM_WID_QType of obj <> NULL if s_ASYM_LogType is "ResponseData" txt = name of obj & tab & "ShowScore!" & tab & quote & ASYM_WID_Responses() of obj & quote & CRLF else get ASYM_QuestionStatus of obj txt = "Q=" & name of obj && ": E=Show Score : S=" & items 2 to itemCount(it) of it end else txt = "Q=" & name of obj && ": E=Show Score : S=" & score end get ASYM_LogWriteEntry(txt) end end -- HANDLER TO CHECK HOW MANY TRIES HAVE BEEN MADE -- ADD TO THE COUNT to handle ASYM_CheckTrys target, obj if not isType(real,ASYM_WID_TriesUsed of target) ASYM_WID_TriesUsed of target = 0 end if not isType(real,ASYM_WID_TriesUsed of obj) ASYM_WID_TriesUsed of obj = 0 end increment ASYM_WID_TriesUsed of obj if ASYM_WID_TriesMax of obj <> 0 and ASYM_WID_TriesUsed of obj >= ASYM_WID_TriesMax of obj ASYM_WID_TimeLocked of target = ASYM_Ticks() ASYM_WID_AnswerLocked of target = TRUE ASYM_WID_AnswerLocked of obj = TRUE send ASYM_Locked to obj end end