Diff for /capa/capa51/GUITools/scorer.tcl between versions 1.11 and 1.12

version 1.11, 2000/02/08 22:18:11 version 1.12, 2000/02/22 18:10:27
Line 800  proc oneResponse { response max which } Line 800  proc oneResponse { response max which }
 ###########################################################  ###########################################################
 ###########################################################  ###########################################################
 proc parseLine { num answerLine answerStruct } {  proc parseLine { num answerLine answerStruct } {
     global gScorer      global gScorer gMult
     upvar $answerStruct parsedIn      upvar $answerStruct parsedIn
     set result ""      set result ""
   
Line 853  proc parseLine { num answerLine answerSt Line 853  proc parseLine { num answerLine answerSt
     set parsedIn(answer.$i) [string index $array $which]      set parsedIn(answer.$i) [string index $array $which]
  } else {   } else {
     if { $howmany > 1 } {       if { $howmany > 1 } { 
  set parsedIn(answer.$i) " "   set options ""
    foreach possible $which {
       append options "[string index $array $possible] "
    }
    set selected [multipleChoice . "There were multiple marks on\nPaper Number $parsedIn(SerialNumber)\nStudentNumber $parsedIn(StudentNumber)\nProblem Number [expr $i+1]" $options]
    #puts ":$parsedIn(StudentNumber):$parsedIn(SerialNumber):[format %2d [expr $i+1]]:$selected:$options"
    set parsedIn(answer.$i) $selected
    #puts $parsedIn(answer.$i)
  incr parsedIn(multiplemarks)   incr parsedIn(multiplemarks)
     } else {      } else {
  if { $howmany < 1 } {    if { $howmany < 1 } { 
Line 881  proc parseLine { num answerLine answerSt Line 888  proc parseLine { num answerLine answerSt
  [expr {$start + $which}]]   [expr {$start + $which}]]
     } else {      } else {
  if { $howmany > 1 } {    if { $howmany > 1 } { 
     append parsedIn(answer.$i) " "      set options ""
       foreach possible $which {
    append options "[string index $array [expr {$start + $possible}]] "
       }
       set selected [multipleChoice . "There were multiple marks on\nPaper Number $parsedIn(SerialNumber)\nStudentNumber $parsedIn(StudentNumber)\nProblem Number [expr $i+1]" $options]
       #puts ":$parsedIn(StudentNumber):$parsedIn(SerialNumber):[format %2d [expr $i+1]]:$selected:$options"
       append parsedIn(answer.$i) $selected
       #puts $parsedIn(answer.$i)
     incr parsedIn(multiplemarks)      incr parsedIn(multiplemarks)
  } else {   } else {
     if { $howmany < 1 } {       if { $howmany < 1 } { 
Line 933  proc parseLine { num answerLine answerSt Line 947  proc parseLine { num answerLine answerSt
     if { $result != "" } {      if { $result != "" } {
  error "$result"   error "$result"
     }      }
       if { [catch {incr gMult $parsedIn(multiplemarks)}] } {
    set gMult $parsedIn(multiplemarks)
       }
   #    puts $gMult
 }  }
   
 proc getAnswers2 { PID set maxQuest num } {  proc getAnswers2 { PID set maxQuest num } {
Line 1247  proc setOutput { num answerStructVar} { Line 1265  proc setOutput { num answerStructVar} {
 ###########################################################  ###########################################################
 ###########################################################  ###########################################################
 proc finishScoring { num answerStructVar} {  proc finishScoring { num answerStructVar} {
     global gScorer      global gScorer gMult
     scorerMessage $num "Finishing . . ."      scorerMessage $num "Finishing . . ."
       #puts $gMult
 #    puts "errors:"  #    puts "errors:"
 #    puts "$gScorer(errors.$num)"  #    puts "$gScorer(errors.$num)"
     scorerMessage $num "Finished, Feel free to Update .sb"      scorerMessage $num "Finished, Feel free to Update .sb"
Line 1294  proc scorerStudent { num } { Line 1313  proc scorerStudent { num } {
     set gScorer(needToUpdateDB) 1      set gScorer(needToUpdateDB) 1
 #parseanswerline  #parseanswerline
     if { [catch {parseLine $num $answer answerStruct} errorMsg ] } {      if { [catch {parseLine $num $answer answerStruct} errorMsg ] } {
  displayError "Error parsing line: $errorMsg"   global errorInfo
    displayError "Error parsing line: $errorMsg $errorInfo"
     } else {      } else {
 #parse the set and grades it for any possiblely matching student  #parse the set and grades it for any possiblely matching student
  if { ! [ catch { set result [handleStudent $num answerStruct]} errorMsg ] } {   if { ! [ catch { set result [handleStudent $num answerStruct]} errorMsg ] } {
Line 1360  proc unpauseScorer { num } { Line 1380  proc unpauseScorer { num } {
 proc finalScorer { num method studentNumber numRight } {  proc finalScorer { num method studentNumber numRight } {
     global gScorer      global gScorer
   
       #puts ":$numRight:"
     set answers ""      set answers ""
     for { set i 0 } { $i < $gScorer(numQuest.$num) } { incr i } {      for { set i 0 } { $i < $gScorer(numQuest.$num) } { incr i } {
  switch $gScorer(quest.$i.type.$num) {   switch $gScorer(quest.$i.type.$num) {

Removed from v.1.11  
changed lines
  Added in v.1.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>