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.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-checks-procs-oracle.xql 24 Jan 2005 17:59:52 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-checks-procs-oracle.xql 29 Jan 2005 18:03:12 -0000 1.2 @@ -4,17 +4,75 @@ - select nextval('as_actions_log_action_log_id') + select action_log_id_seq.nextval from dual + + + select action_log_id_seq.nextval from dual + + - + + - select nextval('as_actions_log_action_log_id') + declare begin + :1 := as_inter_item_check.new ( + inter_item_check_id => null, + name => :name, + action_p => :action_p, + section_id_from => :section_id_from, + section_id_to => :section_id_to, + check_sql => :check_sql, + description => :description, + postcheck_p => :postcheck_p, + item_id => null, + assessment_id => :assessment_id, + creation_user => :user_id, + context_id => null, + object_type => 'as_inter_item_checks', + creation_date => :date + ); + end; + + + begin + as_inter_item_check.delete(:check_id); + end; + + + + + + + + select to_date(sysdate,'YYYY-MM-DD') as today, to_date(sysdate-1,'YYYY-MM-DD') as yesterday, to_date (sysdate-2,'YYYY-MM-DD') as two_days,to_date (sysdate-7,'YYYY-MM-DD') as last_week, to_date (sysdate-30,'YYYY-MM-DD') as last_month from dual + + + + + + update as_actions_log set failed_p=:failed_p,date_processed=(select sysdate from dual),finally_executed_by=:user_id,approved_p='t' where action_log_id=:action_log_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) 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) values (:log_id,:check_id,:action_id,(select sysdate from dual),null,'f','f',null,:session_id) + + + + \ No newline at end of file