diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-12-08 21:03:06 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-12-08 21:03:06 -0500 |
commit | 03982e0d096912911894ea0ef9de99576fa83ff7 (patch) | |
tree | 760130974e84fc0a6bc6e4899668a43c69bee2b4 /GradeBook_lib.tcl | |
parent | 823c3e9f6fe02188241f6e703363b8e99916284d (diff) | |
download | GradeBook-03982e0d096912911894ea0ef9de99576fa83ff7.tar.gz GradeBook-03982e0d096912911894ea0ef9de99576fa83ff7.zip |
begin, end transaction script replaced with functions
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-x | GradeBook_lib.tcl | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 5682032..de5f91c 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -309,12 +309,7 @@ proc calculteWeightedTotals { } { # we will do everything with in one transaction # otherwise I see performance degradation on some computers # when there are a lot if update statements - set eval_str [concat BEGIN TRANSACTION] - set err [catch {db eval $eval_str } errStat] - if { $err } { - htmlErrorMsg $errStat - dbg "the following error happen: $errStat" msg_level_critical - } + begin_db_transaction set grades_category [ get_grades_category ] #global grades_category @@ -404,13 +399,7 @@ proc calculteWeightedTotals { } { UpdateColValue4UserNameNonWeb $grand_total_col_name _Max_Points_ $max_weighted_sum # ending transaction - set eval_str [concat END TRANSACTION] - set err [catch {db eval $eval_str } errStat] - if { $err } { - htmlErrorMsg $errStat - dbg "the following error happen: $errStat" msg_level_critical - } - + end_db_transaction } proc grade_Category2html_name { category } { |