aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2011-01-18 23:28:26 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2011-01-18 23:28:26 -0500
commitac52c71275beb06afc686604cd50c0e0127f2b0f (patch)
treee13f4b79cfc8dc84cf5ed80bc70d527db0f60be1
parentdc173a71fc447c40c38426817a5fb81c95063d4e (diff)
downloadGradeBook-ac52c71275beb06afc686604cd50c0e0127f2b0f.tar.gz
GradeBook-ac52c71275beb06afc686604cd50c0e0127f2b0f.zip
added routine to add column outside of web interface
Ignore-this: 579f7134fea5c4df5f502e7a03f316ed darcs-hash:20110119042826-067c0-88123269051e1525a4142ee0f7fc2c637ce2f8ba.gz
-rwxr-xr-xGradeBook.tcl15
1 files changed, 9 insertions, 6 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index 2552168..87d208d 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -479,12 +479,7 @@ proc DeleteColumn { permission_list user } {
}
}
-
-proc AddColumn { permission_list user } {
- global script_name
- set columnname2add [::ncgi::value columnname2add {}]
- set column_category [::ncgi::value column_category {}]
- set maxpointpossible [::ncgi::value maxpointpossible {}]
+proc AddColumnNonWeb { columnname2add column_category maxpointpossible } {
if { $columnname2add != "" } {
set eval_str [concat ALTER TABLE GradesTable ADD \"$columnname2add\" text]
@@ -512,6 +507,14 @@ proc AddColumn { permission_list user } {
}
}
+proc AddColumn { permission_list user } {
+ global script_name
+ set columnname2add [::ncgi::value columnname2add {}]
+ set column_category [::ncgi::value column_category {}]
+ set maxpointpossible [::ncgi::value maxpointpossible {}]
+ AddColumnNonWeb $columnname2add $column_category $maxpointpossible
+}
+
proc AddColumnRequest { permission_list user } {
global script_name
puts {<div class="add_new_column">}