Hello lists,

               I know i have posted this already, but please i really 
needed your help, linguists:-(.

             Just as the team  finished with the Evaluation Exam of our
   project, the team was asked to edit this part.  Instead of the user be
   asked to select just one option from the list of solutions, the user have
   to click the buttons for all correct answers.  If one correct of the
   corrects answers is not selected/clicked by the user, then that question
   number is considered wrong. I know this is asking to much from you guys,
   but please i hope you kind linguists can help us with this.  Below is the
   code that we have encoded in the program.( the scripts are from the sample
   program of Gary Rosenzweig with minor changes and yours' Roy :-)

   - -- this is a movie script
   global gAnswerList

   on startTest
      gAnswerList = []
      member("name2").text = member("name").text

   end

   on nextQuestion
      recordAnswer
      go next
      setAnswer
   end

   on previousQuestion
      recordAnswer
      go previous
      setAnswer
   end

   on recordAnswer
      -- get question number from frame label
      q = word 2 of the frameLabel
      q = value(q)

      -- get answer from radio buttons
      a = sendSprite(sprite 22, #selected)
      a = a - 21

      -- remember answer
      setAt gAnswerList, q, a
   end

   on setAnswer
      -- get question number from frame label
      q = word 2 of the frameLabel
      q = value(q)

      -- get answer from radio buttons
      if gAnswerList.count >= q then
        a = gAnswerList[q]
        sendSprite(sprite (a+21), #turnMeOn)
      end if
   end

   on finishedTest
      recordAnswer
      computeResults
      go to frame "finished"
   end

   on computeResults

      -- get list of correct answers
      correct = member("Correct Answers").text

      oldDelim = the itemDelimiter
      the itemDelimiter = "|"
      numright = 0
      repeat with i = 1 to correct.line.count
        thisLine = correct.line[i]
        repeat with myItem = 1 to thisLine.item.count
          if value(thisLine.item[myItem] = gAnswerList[i]) then
            numright = numright + 1
            exit repeat
          end if
        end repeat
      end repeat
      the itemDelimiter = oldDelim
      --display result to layout screen
      put numright into field "score"
      put i - 1 into  field "number q"
      put ((numright * 1.0 / (i - 1))) * 100.00 into field "percent"

   end


   - ---this script is attach to all the buttons in the list of choices

   property pOnMember, pOffMember, pState, pGroupList

   on getPropertyDescriptionList me
      list = [:]
      addProp list, #pOnMember, [#comment: "On Member",\
        #format: #member, #default: ""]
      addProp list, #pOffMember, [#comment: "Off Member",\
        #format: #member, #default: ""]
      addProp list, #pState, [#comment: "Initial State",\
        #format: #boolean, #default: FALSE]
      addProp list, #pGroupList, [#comment: "Group List",\
        #format: #list, #default: []]
      return list
   end

   on beginSprite me
      if pState then turnMeOn(me)
   end

   on mouseUp me
      turnMeOn(me)
   end

   on turnMeOn me
      pState = TRUE
      sprite(me.spriteNum).member = pOnMember
   end


   on selected me
      repeat with i in pGroupList
        if sprite(i).pState = TRUE then return i
      end repeat
   end



            Any help would be highly appreciated, and thanks a zillion in
   advance :-)


   ellen :-)


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to