Diff for /capa/capa51/GUITools/capastats.tcl between versions 1.9 and 1.13

version 1.9, 2000/01/10 22:40:30 version 1.13, 2000/02/22 18:10:27
Line 597  proc CTparseSubmissionsLine { aline num Line 597  proc CTparseSubmissionsLine { aline num
     set gCT($num.response) ""      set gCT($num.response) ""
     set interesting 0      set interesting 0
     set current 1      set current 1
     foreach {quest response} [lrange $aline 2 end] {      foreach element [lrange $aline 2 end] {
    set quest [lindex $element 0]
    set response [lindex $element 1]
  if { $quest == "" } break   if { $quest == "" } break
  while { $quest > $current } {   while { $quest > $current } {
     lappend gCT($num.response) {}      lappend gCT($num.response) {}
Line 1099  proc CTcollectSetScores { num path id on Line 1101  proc CTcollectSetScores { num path id on
     set char [lindex $ans_char $i]      set char [lindex $ans_char $i]
     if { $char == "N" || $char == "n"} { set found 1 }      if { $char == "N" || $char == "n"} { set found 1 }
     if { $char == "Y" || $char == "y"} {       if { $char == "Y" || $char == "y"} { 
  incr score [lindex $weights $i];set found 1   catch {incr score [lindex $weights $i]}
    set found 1
     }      }
     if { $char >= 0 && $char <= 9 } {       if { $char >= 0 && $char <= 9 } { 
  incr score $char;set found 1   incr score $char;set found 1
     }      }
     if { $char == "E" } {      if { $char == "E" } {
  incr valid_weights "-[lindex $weights $i]"   catch {incr valid_weights "-[lindex $weights $i]"}
     }      }
  }   }
  incr total_scores $score   incr total_scores $score
Line 1572  proc CTitemCorrelation { num classpath s Line 1575  proc CTitemCorrelation { num classpath s
  ## $ans_char($ii) is one of 0 .. 9, Y, y, N, n   ## $ans_char($ii) is one of 0 .. 9, Y, y, N, n
  ## $ans_char($jj) is one of 0 .. 9, Y, y, N, n   ## $ans_char($jj) is one of 0 .. 9, Y, y, N, n
  if { $ans_char($ii) == "Y" || $ans_char($ii) == "y" } {   if { $ans_char($ii) == "Y" || $ans_char($ii) == "y" } {
     set x_data [lindex $weights $ii]      if {[set x_data [lindex $weights $ii]]==""} {set x_data 0}
  } elseif { $ans_char($ii) == "N" || $ans_char($ii) == "n" } {   } elseif { $ans_char($ii) == "N" || $ans_char($ii) == "n" } {
     set x_data 0      set x_data 0
  } else { ## must be in 0 .. 9   } else { ## must be in 0 .. 9
     set x_data $ans_char($ii)      set x_data $ans_char($ii)
  }   }
  if { $ans_char($jj) == "Y" || $ans_char($jj) == "y" } {   if { $ans_char($jj) == "Y" || $ans_char($jj) == "y" } {
     set y_data [lindex $weights $jj]      if {[set y_data [lindex $weights $jj]]==""} {set y_data 0}
  } elseif { $ans_char($jj) == "N" || $ans_char($jj) == "n" } {   } elseif { $ans_char($jj) == "N" || $ans_char($jj) == "n" } {
     set y_data 0      set y_data 0
  } else { ## must be in 0 .. 9   } else { ## must be in 0 .. 9
Line 1720  proc CTreportDist { num file percentage Line 1723  proc CTreportDist { num file percentage
  }   }
  set aline [gets $fileId]   set aline [gets $fileId]
     }      }
     CTputs $num "Scores #acheived\n"      CTputs $num "Scores #achieved\n"
     set scorelist ""      set scorelist ""
     set templist [array names totals *.score]      set templist [array names totals *.score]
     foreach temp $templist {lappend possiblescores [lindex [split $temp .] 0]}      foreach temp $templist {lappend possiblescores [lindex [split $temp .] 0]}
Line 1797  proc CTgradeDistribution { num classpath Line 1800  proc CTgradeDistribution { num classpath
     removeStatus $num      removeStatus $num
     displayStatus "Pondering data . . ." spinner $num      displayStatus "Pondering data . . ." spinner $num
     CTputs $num " There are $valid_cnt entries in file $filename\n"      CTputs $num " There are $valid_cnt entries in file $filename\n"
     CTputs $num "Score #acheived\n"      CTputs $num "Score #achieved\n"
     set scorelist ""      set scorelist ""
     foreach score [lsort -integer [array names total_score]] {      foreach score [lsort -integer [array names total_score]] {
  CTputs $num [format "%5d:%6d\n" $score $total_score($score)]   CTputs $num [format "%5d:%6d\n" $score $total_score($score)]
Line 1884  proc CTgradeDistributionRange { num clas Line 1887  proc CTgradeDistributionRange { num clas
  set total_score($i) 0   set total_score($i) 0
     }      }
     foreach sNum [array names studentScores] { incr total_score($studentScores($sNum)) }      foreach sNum [array names studentScores] { incr total_score($studentScores($sNum)) }
     CTputs $num "Scores #acheived\n"      CTputs $num "Scores #achieved\n"
     set scorelist ""      set scorelist ""
     foreach score [lsort -integer [array names total_score]] {      foreach score [lsort -integer [array names total_score]] {
  CTputs $num [format "%5d:%6d\n" $score $total_score($score)]   CTputs $num [format "%5d:%6d\n" $score $total_score($score)]
Line 2537  proc CTdisplayStudent { num window path Line 2540  proc CTdisplayStudent { num window path
   
     label $infoFrame.label -text $id      label $infoFrame.label -text $id
     pack $infoFrame.label      pack $infoFrame.label
       
     set canvas [canvas $imageFrame.canvas]      set height [image height $image]
       set width [image width $image]
       set canvas [canvas $imageFrame.canvas -height $height -width $width]
     pack $canvas      pack $canvas
     $canvas create image 1 1 -image $image -anchor nw      $canvas create image 1 1 -image $image -anchor nw
 }  }
Line 2683  proc CTdiscussForum { num file dir resul Line 2688  proc CTdiscussForum { num file dir resul
     while {![eof $fileId]} {      while {![eof $fileId]} {
  incr line_cnt   incr line_cnt
  if { ($line_cnt%20) == 0 } { updateStatusBar [expr $line_cnt/double($maxLine)] $num }   if { ($line_cnt%20) == 0 } { updateStatusBar [expr $line_cnt/double($maxLine)] $num }
  foreach {stunum capaid name email action set prob date time} [split $aline "|"] {}   foreach {stunum capaid name email action set prob date time blank} [split $aline "|"] {}
  if {$specificSet && ($specificSet == $set)} {set aline [gets $fileId];continue}   if {$specificSet && ($specificSet == $set)} {set aline [gets $fileId];continue}
  if { $action == "ViewProblem" } {   if { $action == "ViewProblem" } {
     if { [catch {incr count($set,$prob)}]} {      if { [catch {incr count($set,$prob)}]} {
Line 2730  proc CTdiscussForum { num file dir resul Line 2735  proc CTdiscussForum { num file dir resul
     close $fileId      close $fileId
     set result($num.viewers) [llength [array names ever]]      set result($num.viewers) [llength [array names ever]]
     set result($num.last) $last      set result($num.last) $last
     #IDEAS: stick into capastats      #IDEAS:
     #     : howmany viws are repeats      #     : how many views are repeats
     #     : Student Course Profile, add #ViewProblems #Posts      #     : Student Course Profile, add #ViewProblems #Posts
     #     : add some portion of these stats to analyze log files?      #     : add some portion of these stats to analyze log files?
 }  }
Line 2907  proc CTcreateSummaryReport { num cmdnum Line 2912  proc CTcreateSummaryReport { num cmdnum
     set file Sec$gCT(summary.section.$cmdnum)Set$gCT(summary.set.$cmdnum).rpt       set file Sec$gCT(summary.section.$cmdnum)Set$gCT(summary.set.$cmdnum).rpt 
  }   }
  default {   default {
     displayError "An error has occured while creating a summary \      displayError "An error has occurred while creating a summary \
     report $gCT(summary.section.$cmdnum)"      report $gCT(summary.section.$cmdnum)"
     return      return
  }   }
Line 2951  proc CTsetList { file } { Line 2956  proc CTsetList { file } {
  }   }
     }      }
     return $list      return $list
 }  
   
   }

Removed from v.1.9  
changed lines
  Added in v.1.13


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