Index: openacs-4/packages/assessment-portlet/www/assessment-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/www/assessment-portlet-oracle.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/assessment-portlet/www/assessment-portlet-oracle.xql 7 Oct 2007 22:36:55 -0000 1.6 +++ openacs-4/packages/assessment-portlet/www/assessment-portlet-oracle.xql 16 Feb 2008 18:52:19 -0000 1.7 @@ -11,7 +11,6 @@ to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') as cur_time, cf.package_id, p.instance_name as community_name, sc.node_id as comm_node_id, sa.node_id as as_node_id, a.anonymous_p, - acs_permission.permission_p(a.assessment_id,:user_id,'admin') as admin_p, (select count(*) from as_sessions s1, cr_revisions cr1 where s1.assessment_id=cr1.revision_id @@ -40,10 +39,6 @@ from as_assessment_section_map asm, as_item_section_map ism where asm.assessment_id = a.assessment_id and ism.section_id = asm.section_id) - and exists (select 1 from acs_object_party_privilege_map ppm - where ppm.object_id = a.assessment_id - and ppm.privilege = 'read' - and ppm.party_id = :user_id) order by lower(p.instance_name), lower(cr.title) ) q where (q.completed_p < q.number_tries) or (q.number_tries=0 or q.number_tries is null) Index: openacs-4/packages/assessment-portlet/www/assessment-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/www/assessment-portlet-postgresql.xql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/assessment-portlet/www/assessment-portlet-postgresql.xql 7 Oct 2007 22:36:55 -0000 1.13 +++ openacs-4/packages/assessment-portlet/www/assessment-portlet-postgresql.xql 16 Feb 2008 18:52:20 -0000 1.14 @@ -12,7 +12,6 @@ to_char(now(), 'YYYY-MM-DD HH24:MI:SS') as cur_time, cf.package_id, p.instance_name as community_name, sc.node_id as comm_node_id, sa.node_id as as_node_id, a.anonymous_p, - acs_permission__permission_p(a.assessment_id,:user_id,'admin') as admin_p, (select count(*) from as_sessions s1, cr_revisions cr1 where s1.assessment_id=cr1.revision_id @@ -31,11 +30,7 @@ site_nodes sa, site_nodes sc, apm_packages p, (select distinct asm.assessment_id from as_assessment_section_map asm, as_item_section_map ism - where ism.section_id = asm.section_id - and exists (select 1 from acs_object_party_privilege_map ppm - where ppm.object_id = asm.assessment_id - and ppm.privilege = 'read' - and ppm.party_id = :user_id)) s + where ism.section_id = asm.section_id) s where a.assessment_id = cr.revision_id and cr.revision_id = ci.latest_revision and ci.parent_id = cf.folder_id Index: openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl 15 May 2007 20:14:19 -0000 1.12 +++ openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl 16 Feb 2008 18:52:20 -0000 1.13 @@ -101,7 +101,10 @@ } else { set status untaken } + set admin_p [permission::permission_p -object_id $assessment_id -privilege admin] + if {[permission::permission_p -object_id $assessment_id -privilege read]} { template::multirow append assessments $assessment_id $title $description $assessment_url $community_url $community_name $anonymous_p $in_progress_p $completed_p $status $number_tries $admin_p + } }