Index: openacs-4/packages/assessment/tcl/as-checks-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/assessment/tcl/as-checks-procs-oracle.xql 29 Jan 2005 18:03:12 -0000 1.2
+++ openacs-4/packages/assessment/tcl/as-checks-procs-oracle.xql 31 Jan 2005 22:30:48 -0000 1.3
@@ -64,13 +64,13 @@
- insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id) values (:log_id,:check_id,:action_id,(select sysdate from dual),(select sysdate from dual),'t',:failed,:user_id,:session_id)
+ insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id,error_txt) values (:log_id,:check_id,:action_id,(select sysdate from dual),(select sysdate from dual),'t',:failed,:user_id,:session_id,:message)
- insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id) values (:log_id,:check_id,:action_id,(select sysdate from dual),null,'f','f',null,:session_id)
+ insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id,error_txt) values (:log_id,:check_id,:action_id,(select sysdate from dual),null,'f','f',null,:session_id,:message)
Index: openacs-4/packages/assessment/tcl/as-checks-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs-postgresql.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/assessment/tcl/as-checks-procs-postgresql.xql 29 Jan 2005 18:03:12 -0000 1.4
+++ openacs-4/packages/assessment/tcl/as-checks-procs-postgresql.xql 31 Jan 2005 22:30:48 -0000 1.5
@@ -48,13 +48,13 @@
- insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id) values (:log_id,:check_id,:action_id,now(),now(),'t',:failed,:user_id,:session_id)
+ insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id,error_txt) values (:log_id,:check_id,:action_id,now(),now(),'t',:failed,:user_id,:session_id,:message)
- insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id) values (:log_id,:check_id,:action_id,now(),null,'f','f',null,:session_id)
+ insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id,error_txt) values (:log_id,:check_id,:action_id,now(),null,'f','f',null,:session_id,:message)
Index: openacs-4/packages/assessment/tcl/as-checks-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/assessment/tcl/as-checks-procs.tcl 28 Jan 2005 20:31:32 -0000 1.8
+++ openacs-4/packages/assessment/tcl/as-checks-procs.tcl 31 Jan 2005 22:30:48 -0000 1.9
@@ -178,10 +178,14 @@
set user_id [ad_conn user_id]
set log_id [db_string get_next_val {}]
set action_id [db_string action_id {}]
-
+ set message " "
+ if { $failed == "f" } {
+ set message "This action failed."
+ }
db_transaction {
- db_dml insert_action {}
+ db_dml insert_action {}
}
+
}
ad_proc -public as::assessment::check::manual_action_log {
@@ -194,7 +198,8 @@
set user_id [ad_conn user_id]
set log_id [db_string get_next_val {}]
set action_id [db_string action_id {}]
-
+ set message " "
+
db_transaction {
db_dml insert_action {}
@@ -208,6 +213,8 @@
} {
} {
+ set error_txt ""
+
db_foreach get_check_params { } {
set parameter_name [db_1row select_name {}]
@@ -239,8 +246,13 @@
if { $failed > 0 } {
set failed_p "f"
+ set error_txt "This action failed"
}
+
+ notification::new -type_id [notification::type::get_type_id -short_name as_inter_item_checks_notif] -object_id $inter_item_check_id -notif_subject "$action_name has been executed" -notif_text "The action $action_name has been executed. This message has been showed to the user: $user_message $error_txt"
+
as::assessment::check::action_log -session_id $session_id -check_id $inter_item_check_id -failed $failed_p
+
}
@@ -287,6 +299,9 @@
set user_id [ad_conn user_id]
db_dml update_actions_log {}
+ notification::new -type_id [notification::type::get_type_id -short_name as_inter_item_checks_notif] -object_id $inter_item_check_id -notif_subject "$action_name has been executed" -notif_text "The action $action_name has been executed. This message has been showed to the user: $user_message"
+
+
}
Index: openacs-4/packages/assessment/tcl/as-checks-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs.xql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/assessment/tcl/as-checks-procs.xql 29 Jan 2005 18:03:12 -0000 1.6
+++ openacs-4/packages/assessment/tcl/as-checks-procs.xql 31 Jan 2005 22:30:48 -0000 1.7
@@ -177,7 +177,7 @@
- select a.tcl_code from as_actions a,as_action_map am where am.action_id = a.action_id and am.inter_item_check_id = :inter_item_check_id
+ select a.tcl_code,am.user_message,a.name as action_name from as_actions a,as_action_map am where am.action_id = a.action_id and am.inter_item_check_id = :inter_item_check_id
@@ -201,7 +201,7 @@
- select a.tcl_code from as_actions a,as_action_map am where am.action_id = a.action_id and inter_item_check_id = :inter_item_check_id
+ select a.tcl_code, am.name as action_name,am.user_message from as_actions a,as_action_map am where am.action_id = a.action_id and inter_item_check_id = :inter_item_check_id