diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-01-21 10:30:22 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-01-21 10:30:22 -0500 |
commit | abe00d7c756f9f190b973608b0bef437b89955cb (patch) | |
tree | 1bc01eb6f80eaae6516a148549608f7170fc1ffe /GradeBook.tcl | |
parent | 662dbb276c5de5997cb26e89cafbe330669a9978 (diff) | |
download | GradeBook-abe00d7c756f9f190b973608b0bef437b89955cb.tar.gz GradeBook-abe00d7c756f9f190b973608b0bef437b89955cb.zip |
UpdateColumn uses UpdateColValue4UserNameNonWeb
Ignore-this: 4343ca95844ed4f5e90fc1aaf185cd0c
darcs-hash:20110121153022-067c0-9fdc6637e69641da1fd354037ab9bb7eaf8537c5.gz
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-x | GradeBook.tcl | 15 |
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 |