diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-12-15 15:15:33 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-12-15 15:16:57 -0500 |
commit | 2298e757b7fc95bf91c35d1e2f5942a4b6cd3aef (patch) | |
tree | 798019935b4ab244523739cfbfbec417de4840aa | |
parent | 3a938a17f663947ff0cd67dc0167076a36e9cdd0 (diff) | |
download | GradeBook-2298e757b7fc95bf91c35d1e2f5942a4b6cd3aef.tar.gz GradeBook-2298e757b7fc95bf91c35d1e2f5942a4b6cd3aef.zip |
simplified check of the sorting column
-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 } |