Index: openacs-4/packages/assessment/tcl/as-item-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-procs.xql,v
diff -u -N -r1.4 -r1.5
--- openacs-4/packages/assessment/tcl/as-item-procs.xql 13 Apr 2005 10:48:29 -0000 1.4
+++ openacs-4/packages/assessment/tcl/as-item-procs.xql 13 Apr 2005 18:51:54 -0000 1.5
@@ -72,32 +72,23 @@
-
-
-
- select max(t.as_item_type_id) as as_item_type_id
- from as_item_type_mc t, cr_revisions c, as_item_rels r
- where t.as_item_type_id = r.target_rev_id
- and r.item_rev_id = :as_item_id
- and r.rel_type = 'as_item_type_rel'
- and c.revision_id = t.as_item_type_id
- group by c.title, t.increasing_p, t.allow_negative_p,
- t.num_correct_answers, t.num_answers
-
-
-
-
-
+
-
- select d.choice_orientation
- from as_item_rels r, as_item_display_$presentation_type d
- where r.item_rev_id = :as_item_id
- and r.rel_type = 'as_item_display_rel'
- and r.target_rev_id = d.as_item_display_id
-
+ select cr.title, i.subtext, i.data_type,
+ max(oi.object_id) as item_type_id, oi.object_type as item_type,
+ od.object_id as display_type_id, od.object_type as display_type
+ from as_items i, cr_revisions cr, as_item_rels it,
+ as_item_rels dt, acs_objects oi, acs_objects od
+ where i.as_item_id = :as_item_id
+ and cr.revision_id = i.as_item_id
+ and it.item_rev_id = i.as_item_id
+ and dt.item_rev_id = i.as_item_id
+ and it.rel_type = 'as_item_type_rel'
+ and dt.rel_type = 'as_item_display_rel'
+ and oi.object_id = it.target_rev_id
+ and od.object_id = dt.target_rev_id
+ group by cr.title, i.subtext, i.data_type, oi.object_type,od.object_id, od.object_type
-