aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2011-01-21 10:21:50 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2011-01-21 10:21:50 -0500
commit662dbb276c5de5997cb26e89cafbe330669a9978 (patch)
treece84b3da057803a8d5b0e007f1abd92edae19414
parentae32769254b3641abf8ff06f5bec229fefa0ebe0 (diff)
downloadGradeBook-662dbb276c5de5997cb26e89cafbe330669a9978.tar.gz
GradeBook-662dbb276c5de5997cb26e89cafbe330669a9978.zip
AddColumnNonWeb uses UpdateColValue4UserNameNonWeb
Ignore-this: b72ce3e4adc5993f89eba75245f15edf darcs-hash:20110121152150-067c0-70369ae269a0c61c1caa6ad6736ee78a6692314f.gz
-rwxr-xr-xGradeBook.tcl15
1 files changed, 2 insertions, 13 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index 3943d4f..f2f130b 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -642,19 +642,8 @@ proc AddColumnNonWeb { columnname2add column_category maxpointpossible } {
dbg "the following error happen: $errStat" 3
}
- set sql_str [concat UPDATE GradesTable SET \"$columnname2add\"=\'$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 \"$columnname2add\"=\'$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 $columnname2add _Col_Category_ $column_category
+ UpdateColValue4UserNameNonWeb $columnname2add _Max_Points_ $maxpointpossible
} else {
htmlErrorMsg "empty column names are not permitted"
}