From 09fb60f2541d2b9ebf3c6d7651325ee6dfc12b1c Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Mon, 28 May 2018 21:49:23 -0400 Subject: do not show histogram marker if nessesary stats are not available --- GradeBook_lib.tcl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'GradeBook_lib.tcl') diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 11280ee..17e8f6b 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -1405,11 +1405,16 @@ proc htmlFormatColVal { col_value columnname user user_shown permission_list {fo UserHiddenGradeCategories \ ] - # adding histogram marker if { ([SelectColValue4User GroupName $user_shown] ne "inforow") && ($user ni $special_user_names) && ($columnname ni $embeded_actions_excluded_special_columns) } { + # adding histogram marker + set hist_marker "" set col_histogram_limits [SelectColValue4User $columnname _The_Grades_Hist_Limits_] - set histPositionMarker [markNthBin [binInHistogram $col_value_raw $col_histogram_limits]] - set col_str_value "$histPositionMarker
$col_str_value" + if { $col_histogram_limits ne "" } { + set histPositionMarker [markNthBin [binInHistogram $col_value_raw $col_histogram_limits]] + append hist_marker "$histPositionMarker
" + } + # adding special span for grade itself + set col_str_value "$hist_marker$col_str_value" } if { ([SelectColValue4User GroupName $user_shown] ne "inforow") && ($user ni $special_user_names) && ($category ne "weighted_column") && ($columnname ni $embeded_actions_excluded_special_columns) } { -- cgit v1.2.3