From 662dbb276c5de5997cb26e89cafbe330669a9978 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Fri, 21 Jan 2011 10:21:50 -0500 Subject: AddColumnNonWeb uses UpdateColValue4UserNameNonWeb Ignore-this: b72ce3e4adc5993f89eba75245f15edf darcs-hash:20110121152150-067c0-70369ae269a0c61c1caa6ad6736ee78a6692314f.gz --- GradeBook.tcl | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'GradeBook.tcl') 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" } -- cgit v1.2.3