From 1ce7217087fa853a41e783f560beb23ac23d2b49 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Sat, 21 Jan 2012 15:24:04 -0500 Subject: use of new dbg proc call in main file --- GradeBook.tcl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'GradeBook.tcl') 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 "" @@ -86,19 +86,22 @@ if { [file exists $dbfile] && ("$coursedbfname" ne "") } { puts "" 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 "" ###################### 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: -- cgit v1.2.3