aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGradeBook.tcl15
1 files changed, 3 insertions, 12 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index f2f130b..6e7f2e3 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -441,18 +441,9 @@ proc UpdateColumn { permission_list user } {
set maxpointpossible [::ncgi::value maxpointpossible {}]
# first we update category and maxpointpossible values of the old columnname
- set sql_str [concat UPDATE GradesTable SET \"$oldcolumnname\"=\'$column_category\' where UserName=\"_Col_Category_\"]
- set err [catch {db eval $sql_str } errStat]
- if { $err } {
- htmlErrorMsg $errStat
- dbg "the following error happen: $errStat" 3
- }
- set sql_str [concat UPDATE GradesTable SET \"$oldcolumnname\"=\'$maxpointpossible\' where UserName=\"_Max_Points_\"]
- set err [catch {db eval $sql_str } errStat]
- if { $err } {
- htmlErrorMsg $errStat
- dbg "the following error happen: $errStat" 3
- }
+ UpdateColValue4UserNameNonWeb $oldcolumnname _Col_Category_ $column_category
+ UpdateColValue4UserNameNonWeb $oldcolumnname _Max_Points_ $maxpointpossible
+
if { $newcolumnname eq $oldcolumnname } {
# no need to mess with renaming
return