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.4 -r1.5 --- openacs-4/packages/assessment/tcl/as-checks-procs.xql 27 Jan 2005 18:07:37 -0000 1.4 +++ openacs-4/packages/assessment/tcl/as-checks-procs.xql 28 Jan 2005 20:31:32 -0000 1.5 @@ -8,34 +8,7 @@ - - - select to_date(now(),'YYYY-MM-DD') - - - - - select to_date (to_date(now(),'YYYY-MM-DD')-1,'YYYY-MM-DD') - - - - - - select to_date (to_date(now(),'YYYY-MM-DD')-2,'YYYY-MM-DD') - - - - - select to_date (to_date(now(),'YYYY-MM-DD')-7,'YYYY-MM-DD') - - - - - select to_date (to_date(now(),'YYYY-MM-DD')-30,'YYYY-MM-DD') - - - select max(am.order_by) from as_action_map am,as_inter_item_checks c @@ -62,6 +35,13 @@ + + + select inter_item_check_id from as_param_map where parameter_id=:parameter_id and inter_item_check_id = :check_id + + + + insert into as_param_map (parameter_id,inter_item_check_id,value,item_id) values (:parameter_id,:check_id,null,:value) @@ -256,25 +236,19 @@ select max(revision_id) from cr_revisions where item_id=:assessment_id - - - select s.section_id from as_sections s, cr_revisions cr, cr_items ci, as_assessment_section_map asm where ci.item_id = cr.item_id and cr.revision_id = s.section_id and s.section_id = asm.section_id and asm.assessment_id =:assessment_rev_id order by asm.sort_order - - + - select c.inter_item_check_id as check from as_inter_item_checks c,as_action_map am where c.inter_item_check_id=am.inter_item_check_id and am.action_perform='aa' and section_id_from=:section_id order by am.order_by + select c.inter_item_check_id as check from as_inter_item_checks c,as_action_map am where c.inter_item_check_id=am.inter_item_check_id and am.action_perform='aa' and c.assessment_id=:assessment_id select * from as_inter_item_checks c,as_action_map am where c.inter_item_check_id=am.inter_item_check_id and am.action_perform='aa' - and section_id_from=:section_id and c.inter_item_check_id=:check order by am.order_by + and c.assessment_id=:assessment_id and c.inter_item_check_id=:check order by am.order_by - - select max(revision_id) from cr_revisions where item_id=:assessment_id @@ -285,9 +259,9 @@ select s.section_id from as_sections s, cr_revisions cr, cr_items ci, as_assessment_section_map asm where ci.item_id = cr.item_id and cr.revision_id = s.section_id and s.section_id = asm.section_id and asm.assessment_id =:assessment_rev_id order by asm.sort_order - + - select * from as_inter_item_checks c,as_action_map am where c.inter_item_check_id=am.inter_item_check_id and am.action_perform='m' and section_id_from=:section_id order by am.order_by + select * from as_inter_item_checks c,as_action_map am where c.inter_item_check_id=am.inter_item_check_id and am.action_perform='m' and c.assessment_id=:assessment_id order by am.order_by @@ -351,8 +325,7 @@ - select inter_item_check_id from as_inter_item_checks where section_id_from in (select s.section_id from as_sections s, cr_revisions cr, cr_items ci, as_assessment_section_map asm where ci.item_id = cr.item_id and cr.revision_id = s.section_id and s.section_id = asm.section_id and asm.assessment_id =:assessment_rev_id) + select inter_item_check_id from as_inter_item_checks where section_id_from in (select s.section_id from as_sections s, cr_revisions cr, cr_items ci, as_assessment_section_map asm where ci.item_id = cr.item_id and cr.revision_id = s.section_id and s.section_id = asm.section_id and asm.assessment_id =:assessment_id) -