Index: openacs-4/packages/assessment/www/admin/item-add-existing.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/Attic/item-add-existing.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/assessment/www/admin/item-add-existing.xql 15 Nov 2004 12:05:39 -0000 1.1
+++ openacs-4/packages/assessment/www/admin/item-add-existing.xql 9 Dec 2004 11:10:58 -0000 1.2
@@ -11,16 +11,31 @@
+
+
+
+ select distinct item_type
+ from as_item_types_map
+
+
+
+
select i.as_item_id
- from cr_items ci, cr_revisions cr, as_items i
+ from cr_items ci, cr_revisions cr, as_items i, acs_objects ao,
+ persons p, as_item_rels ir, acs_objects o
where cr.revision_id = ci.latest_revision
and i.as_item_id = cr.revision_id
and i.as_item_id not in (select m.as_item_id
from as_item_section_map m
where m.section_id = :section_id)
+ and ao.object_id = cr.revision_id
+ and p.person_id = ao.creation_user
+ and ir.item_rev_id = cr.revision_id
+ and ir.target_rev_id = o.object_id
+ and ir.rel_type = 'as_item_type_rel'
$orderby_clause
@@ -29,13 +44,20 @@
- select i.as_item_id, cr.title
- from cr_items ci, cr_revisions cr, as_items i
+ select i.as_item_id, cr.title, ci.name, p.first_names, p.last_name,
+ o.object_type as item_type
+ from cr_items ci, cr_revisions cr, as_items i, acs_objects ao,
+ persons p, as_item_rels ir, acs_objects o
where cr.revision_id = ci.latest_revision
and i.as_item_id = cr.revision_id
and i.as_item_id not in (select m.as_item_id
from as_item_section_map m
where m.section_id = :section_id)
+ and ao.object_id = cr.revision_id
+ and p.person_id = ao.creation_user
+ and ir.item_rev_id = cr.revision_id
+ and ir.target_rev_id = o.object_id
+ and ir.rel_type = 'as_item_type_rel'
$page_clause
$orderby_clause