diff options
-rwxr-xr-x | GradeBook.tcl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index b2dc580..c93bf67 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -1,6 +1,6 @@ #!/bin/sh # FILE: "/home/evmik/src/my_src/GradeBook/GradeBook.tcl" -# LAST MODIFICATION: "Wed, 15 Dec 2010 17:08:09 -0500 (evmik)" +# LAST MODIFICATION: "Wed, 15 Dec 2010 17:16:40 -0500 (evmik)" # (C) 2010 by Eugeniy Mikhailov, <evgmik@gmail.com> # $Id:$ # vim:set ft=tcl: \ @@ -83,8 +83,12 @@ proc htmlDBout {db {sort_col {}}} { #set x [db eval {SELECT * FROM GradesTable ORDER BY a}] #puts $x global script_name - set defSortCol LastName + set defSortCol LastName + if { $sort_col == {} } { + set sort_col $defSortCol + dbg "empty sort col changed to $sort_col" 4 + } # testing for the existense of the sorting column set eval_str [list SELECT * FROM GradesTable ORDER BY $sort_col] set err [catch {db eval $eval_str } errStat] @@ -95,9 +99,6 @@ proc htmlDBout {db {sort_col {}}} { } set show_header 1 - if { $sort_col == {} } { - set sort_col LastName - } # show the table with grades set eval_str [list SELECT * FROM GradesTable ORDER BY $sort_col] set err [catch { @@ -296,7 +297,7 @@ dbg [::ncgi::names] 4 if { $action == "logon" } { LogMeOn } if { $action == "logoff" } { LogMeOff } -dbg "Connection at $timestamp for user $user" +dbg "===== Connection at $timestamp for user $user =====" set permissions [AccessGroupRights db $user $password] ::ncgi::header |