From ac52c71275beb06afc686604cd50c0e0127f2b0f Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Tue, 18 Jan 2011 23:28:26 -0500 Subject: added routine to add column outside of web interface Ignore-this: 579f7134fea5c4df5f502e7a03f316ed darcs-hash:20110119042826-067c0-88123269051e1525a4142ee0f7fc2c637ce2f8ba.gz --- GradeBook.tcl | 15 +++++++++------ 1 file 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 {
} -- cgit v1.2.3