aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2014-12-05 14:03:15 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2014-12-05 14:03:15 -0500
commitf1b619b584e9f665390e14e46f5e89e3390088df (patch)
treeb52db021c4c2634c27dfeb620b202c6d2d7bb6ba
parent4f0e5dc8db4d9db5116bb51d4d45dffbc341b665 (diff)
downloadGradeBook-f1b619b584e9f665390e14e46f5e89e3390088df.tar.gz
GradeBook-f1b619b584e9f665390e14e46f5e89e3390088df.zip
bug fix: wrong defaults for cgi variable host_name, comments fixed too
-rwxr-xr-xGradeBook.tcl5
1 files changed, 3 insertions, 2 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index 6bd6b52..00a0f67 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -49,11 +49,12 @@ set action [::ncgi::value action defaultview]
# get remote IP
if { [catch {set remote_ip $env(REMOTE_ADDR)} errStat] } { set remote_ip unknown}
# get hostname
-if { [catch {set host_name $env(SERVER_NAME)} errStat] } { set request_uri unknown}
-# script uri
+if { [catch {set host_name $env(SERVER_NAME)} errStat] } { set host_name unknown}
+# script name
if { [catch {set script_name $env(SCRIPT_NAME)} errStat] } { set script_name unknown}
set script_root_name $script_name
# figure out course db filename
+# script uri
if { [catch {set request_uri $env(REQUEST_URI)} errStat] } { set request_uri unknown}
regsub -all $script_name $request_uri "" coursedbfname
regsub -all {\?.*$} $coursedbfname "" coursedbfname