aboutsummaryrefslogtreecommitdiff
path: root/GradeBook_lib.tcl
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2013-12-09 10:34:02 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2013-12-09 10:34:02 -0500
commitca268f5a97dced2ab12781d0c9dadbe6978a6249 (patch)
tree24dd39b085aa15baa3ca3f10bf7349b8dcda5719 /GradeBook_lib.tcl
parenta953ffb5187d6518622c427a3d4a456de640b6e6 (diff)
downloadGradeBook-ca268f5a97dced2ab12781d0c9dadbe6978a6249.tar.gz
GradeBook-ca268f5a97dced2ab12781d0c9dadbe6978a6249.zip
wrapped UpdateGrades and UpdateGradesCategory in begin/end transaction for speed
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-xGradeBook_lib.tcl4
1 files changed, 4 insertions, 0 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index 999bfea..87ff2ab 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -605,6 +605,7 @@ proc UpdateGradesCategores { db permission_list user } {
return
}
if { $subaction eq "Submit" } {
+ begin_db_transaction
set eval_str "SELECT CategoryName FROM GradesCategoryTable"
set err [catch {
db eval $eval_str v {
@@ -622,6 +623,7 @@ proc UpdateGradesCategores { db permission_list user } {
}
}
} errStat ]
+ end_db_transaction
if { $err } {
htmlErrorMsg $errStat
dbg "the following error happen: $errStat" msg_level_critical
@@ -1721,6 +1723,7 @@ proc UpdateGrades { permission_list user } {
set nv [::ncgi::nvlist]
array set colval $nv
if { $subaction eq "Submit" } {
+ begin_db_transaction
set eval_str "SELECT UserName FROM GradesTable"
set err [catch {
db eval $eval_str v {
@@ -1729,6 +1732,7 @@ proc UpdateGrades { permission_list user } {
}
}
} errStat ]
+ end_db_transaction
if { $err } {
htmlErrorMsg $errStat
dbg "the following error happen: $errStat" msg_level_critical