diff options
-rwxr-xr-x | GradeBook.tcl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index bff9175..4500cd1 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -59,19 +59,19 @@ set timestamp [clock format [clock seconds] -format "%Y-%m-%dT%H:%M:%S"] #CreateGradesTable db #CreateAccessRightsTable db -dbg [::ncgi::names] 4 +dbg [::ncgi::names] msg_level_info # logon and logoff actions are granted to everyone if { $action == "logon" } { set action [ LogMeOn ] } if { $action == "logoff" } { LogMeOff; set action defaultview } -dbg "===== Connection at $timestamp for user $user =====" +dbg "===== Connection at $timestamp for user $user_requested =====" msg_level_log ::ncgi::header set user [ Authenticate_User $user_requested $password ] +dbg "Requested user $user_requested logged in as $user" msg_level_dbg set dbfile "$GradebookServerConfig(grades_db_dir)/$coursedbfname" -dbg "DB filename: $dbfile" if { [file exists $dbfile] && ("$coursedbfname" ne "") } { htmlHeader puts "<body>" @@ -86,19 +86,22 @@ if { [file exists $dbfile] && ("$coursedbfname" ne "") } { puts "<body>" if { "$coursedbfname" ne "" } { htmlErrorMsg "No requested database {$coursedbfname}. Please, check your url" - dbg "Attemt to access non existing database: {$dbfile}" + dbg "Attemt to access non existing database: {$dbfile}" msg_level_info } html_Show_Classes_List $permission_list $user } +dbg $permission_list msg_level_dbg + htmlFooter $permission_list puts "</body>" ###################### Main script ends ################################# } errStat ] if { $err } { - dbg "the following error happen: $errStat" 0 + dbg "Error: $errStat" msg_level_critical + htmlErrorMsg "Something went wrong, please, ask admin to have a look at logs" } # vim: ts=2 sw=2 foldmethod=indent: |