From 7d09a9b16d54b5d5ff6b79f1d2c106e5a6245b25 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 10 May 2018 18:37:38 -0400 Subject: cover conner cases with histograms --- GradeBook_lib.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 52bb0bd..21b590e 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -2317,6 +2317,7 @@ proc UpdateColumnGradesHistogram { columnname } { # find maximum in the column with a given name among active students set hist "N/A" set limits "N/A" + set textHist "N/A" set col_values [GetGroupValuesInColumn student $columnname] set col_values [LeaveOnlyNumbersInList $col_values] if { 0 != [llength $col_values] } { @@ -2326,10 +2327,11 @@ proc UpdateColumnGradesHistogram { columnname } { set limits [::math::statistics::minmax-histogram-limits $minVal $maxVal [incr barsNum]] set limits [lrange $limits 1 end-1]; # shave first and last interval limits set hist [::math::statistics::histogram $limits $col_values ] + set textHist [data2txtPlot $hist] } UpdateAndCreateAsNeededInfoRow $columnname _The_Grades_Histogram_ $hist UpdateAndCreateAsNeededInfoRow $columnname _The_Grades_Hist_Limits_ $limits - UpdateAndCreateAsNeededInfoRow $columnname _The_Grades_Hist_Text_Plot_ [data2txtPlot $hist] + UpdateAndCreateAsNeededInfoRow $columnname _The_Grades_Hist_Text_Plot_ $textHist } proc UpdateColumnHighestGrade { columnname } { -- cgit v1.2.3