Index: openacs-4/packages/assessment/tcl/as-apm-action-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-apm-action-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/assessment/tcl/as-apm-action-procs.tcl 7 Aug 2017 23:48:03 -0000 1.9 +++ openacs-4/packages/assessment/tcl/as-apm-action-procs.tcl 25 Apr 2018 21:32:06 -0000 1.10 @@ -1,7 +1,7 @@ ad_library { @author Anny Flores (annyflores@viaro.net) Viaro Networks (www.viaro.net) @creation-date 2004-12-03 - + } namespace eval as::actions {} @@ -13,44 +13,43 @@ return [db_string select_user_id {}] } - + ad_proc -public as::actions::insert_actions { {-package_id} {-node_id} } { -} { +} { # The code does not work at all on Oracle set user_id [as::actions::get_admin_user_id] - + db_exec_plsql insert_default {} } ad_proc -public as::actions::insert_actions_after_upgrade { } { -} { +} { db_exec_plsql after_upgrade {} - + } ad_proc -public as::actions::update_checks_after_upgrade { - + } { } { - set checks [db_list_of_lists get_all_checks {}] + set checks [db_list_of_lists get_all_checks {}] foreach check $checks { - set inter_item_check_id [lindex $check 0] - set check_sql [lindex $check 1] - set cond_list [split $check_sql "="] - set item_id [lindex [split [lindex $cond_list 2] " "] 0] - set condition [lindex [split [lindex $cond_list 1] " "] 0] - - set append_sql " and id.item_data_id = (select max(item_data_id) from as_item_data where as_item_id=$item_id and session_id=:session_id)" - append check_sql $append_sql - - db_dml update_checks {} - + lassign $check inter_item_check_id check_sql + set cond_list [split $check_sql "="] + set item_id [lindex [split [lindex $cond_list 2] " "] 0] + set condition [lindex [split [lindex $cond_list 1] " "] 0] + + set append_sql " and id.item_data_id = (select max(item_data_id) from as_item_data where as_item_id=$item_id and session_id=:session_id)" + append check_sql $append_sql + + db_dml update_checks {} + } }