diff options
-rwxr-xr-x | GradeBook_lib.tcl | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index f94f165..dd0d3e1 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -695,15 +695,8 @@ proc htmlDBout {db permission_list user {sort_col {}}} { set grades_category [ get_grades_category ] set defSortCol LastName - if { $sort_col == {} } { - set sort_col $defSortCol - dbg "empty sort col changed to $sort_col" msg_level_info - } # testing for the existence of the sorting column - set eval_str [concat SELECT * FROM GradesTable ORDER BY \"$sort_col\"] - set err [catch {db eval $eval_str } errStat] - if { $err } { - dbg $errStat msg_level_info + if { ![doesColumnExists $sort_col GradesTable] } { dbg "changing to default sorting column $defSortCol" msg_level_info set sort_col $defSortCol } |