aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGradeBook.tcl4
1 files changed, 3 insertions, 1 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index fdc3dd0..91b4df4 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -40,6 +40,7 @@ set action defaultview
# read cookies
set user_requested [::ncgi::cookie user]
+if { $user_requested eq "" } { set user_requested __user_not_set__ }
set sortCol [::ncgi::cookie sortCol]
set password [::ncgi::cookie password]
set action [::ncgi::value action defaultview]
@@ -55,6 +56,7 @@ if { [catch {set request_uri $env(REQUEST_URI)} errStat] } { set request_uri unk
regsub -all $script_name $request_uri "" coursedbfname
regsub -all {\?.*$} $coursedbfname "" coursedbfname
regsub -all {^/} $coursedbfname "" coursedbfname
+if { $coursedbfname eq "" } { set coursedbfname __DB_not_set__ }
set script_name "$script_name/$coursedbfname"
@@ -89,7 +91,7 @@ if { [file exists $dbfile] && ("$coursedbfname" ne "") } {
htmlHeaderDBSelector
set permission_list [list GroupName guest]
puts "<body>"
- if { "$coursedbfname" ne "" } {
+ if { "$coursedbfname" ne "__DB_not_set__" } {
htmlErrorMsg "No requested database {$coursedbfname}. Please, check your url"
dbg "Attemt to access non existing database: {$dbfile}" msg_level_info
}