--- capa/capa51/GUITools/capastats.tcl 2000/01/12 21:00:24 1.10 +++ capa/capa51/GUITools/capastats.tcl 2000/01/31 18:34:13 1.11 @@ -1099,13 +1099,14 @@ proc CTcollectSetScores { num path id on set char [lindex $ans_char $i] if { $char == "N" || $char == "n"} { set found 1 } 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 } { incr score $char;set found 1 } if { $char == "E" } { - incr valid_weights "-[lindex $weights $i]" + catch {incr valid_weights "-[lindex $weights $i]"} } } incr total_scores $score @@ -1572,14 +1573,14 @@ proc CTitemCorrelation { num classpath s ## $ans_char($ii) 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" } { - 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" } { set x_data 0 } else { ## must be in 0 .. 9 set x_data $ans_char($ii) } 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" } { set y_data 0 } else { ## must be in 0 .. 9 @@ -2537,8 +2538,10 @@ proc CTdisplayStudent { num window path label $infoFrame.label -text $id 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 $canvas create image 1 1 -image $image -anchor nw } @@ -2683,7 +2686,7 @@ proc CTdiscussForum { num file dir resul while {![eof $fileId]} { incr line_cnt 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 { $action == "ViewProblem" } { if { [catch {incr count($set,$prob)}]} {