Index: openacs-4/packages/assessment/tcl/as-qti-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-qti-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-qti-procs.xql 26 Nov 2004 20:48:37 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-qti-procs.xql 10 Feb 2005 09:52:37 -0000 1.2 @@ -3,16 +3,32 @@ - INSERT INTO as_assessment_section_map (assessment_id, section_id, sort_order) - VALUES (:as_assessments__assessment_id, :as_sections__section_id, :as_assessment_section_map__sort_order) + INSERT INTO as_assessment_section_map (assessment_id, section_id, sort_order, points) + VALUES (:as_assessments__assessment_id, :as_sections__section_id, :as_assessment_section_map__sort_order, :as_sections__points) - INSERT INTO as_item_section_map (as_item_id, section_id, sort_order) - VALUES (:as_item_id, :section_id, :as_item_section_map__sort_order) + INSERT INTO as_item_section_map (as_item_id, section_id, sort_order, points) + VALUES (:as_item_id, :section_id, :as_item_section_map__sort_order, :as_items__points) + + + + select sum(aism.points) as as_sections__points + from as_item_section_map aism, as_assessment_section_map aasm + where aism.section_id = aasm.section_id and aasm.section_id = :as_sections__section_id + + + + + + update as_assessment_section_map + set points = :as_sections__points + where section_id = :as_sections__section_id + +