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.2.2.1 -r1.2.2.2
--- openacs-4/packages/assessment/www/asm-admin/index.xql 21 Feb 2006 18:09:34 -0000 1.2.2.1
+++ openacs-4/packages/assessment/www/asm-admin/index.xql 7 Apr 2006 10:49:31 -0000 1.2.2.2
@@ -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
-
-
-
-