Index: openacs-4/packages/imsld/tcl/imsld-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-procs.xql,v
diff -u -r1.41 -r1.42
--- openacs-4/packages/imsld/tcl/imsld-procs.xql 4 Jul 2008 15:29:26 -0000 1.41
+++ openacs-4/packages/imsld/tcl/imsld-procs.xql 22 Oct 2008 10:55:35 -0000 1.42
@@ -2743,5 +2743,49 @@
+
+
+
+ select ii.imsld_item_id
+ from imsld_items ii, imsld_activity_descs lad, imsld_learning_activitiesi la,
+ cr_items cr1, cr_items cr2,
+ acs_rels ar
+ where la.item_id = :activity_item_id
+ and la.activity_description_id = cr1.item_id
+ and cr1.live_revision = lad.description_id
+ and ar.object_id_one = la.activity_description_id
+ and ar.object_id_two = cr2.item_id
+ and cr2.live_revision = ii.imsld_item_id
+
+
+
+
+
+
+
+
+ select icr.resource_id,
+ cp.item_id as resource_item_id,
+ icr.type as resource_type
+ from imsld_cp_resources icr, imsld_items ii, imsld_attribute_instances iai, cr_items ci, cr_items cp,
+ acs_rels ar
+ where ii.imsld_item_id = ci.live_revision
+ and ar.object_id_one = ci.item_id
+ and icr.resource_id = cp.live_revision
+ and ar.object_id_two = cp.item_id
+ and content_revision__is_live(icr.resource_id) = 't'
+ and (imsld_tree_sortkey between tree_left((select imsld_tree_sortkey from imsld_items where imsld_item_id = :imsld_item_id))
+ and tree_right((select imsld_tree_sortkey from imsld_items where imsld_item_id = :imsld_item_id))
+ or ii.imsld_item_id = :imsld_item_id)
+ and iai.owner_id = ii.imsld_item_id
+ and iai.run_id = :run_id
+ and iai.user_id = :user_id
+ and iai.type = 'isvisible'
+ and iai.is_visible_p = 't'
+
+
+
+
+