Index: openacs-4/packages/assessment/www/asm-admin/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/index.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/assessment/www/asm-admin/index.xql 18 Aug 2005 17:33:42 -0000 1.3
+++ openacs-4/packages/assessment/www/asm-admin/index.xql 12 Jun 2006 02:49:51 -0000 1.4
@@ -3,31 +3,19 @@
-
select ci.item_id as assessment_id, cr.title
from cr_items ci, cr_revisions cr
where cr.revision_id = ci.latest_revision
and ci.content_type = 'as_assessments'
and ci.parent_id = :folder_id
+ and exists (select 1 from acs_object_party_privilege_map ppm
+ where ppm.object_id = ci.item_id
+ and ppm.privilege = 'admin'
+ and ppm.party_id = :user_id)
order by cr.title
-
-
-
- select ci.item_id as assessment_id, cr.title
- from cr_items ci, cr_revisions cr
- where cr.revision_id = ci.latest_revision
- and ci.content_type = 'as_assessments'
- and ci.parent_id = :folder_id
- and ci.item_id in (select object_id from acs_permissions where
- grantee_id=:user_id and privilege='admin')
- order by cr.title
-
-
-
-