Index: openacs-4/packages/assessment/www/asm-admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/index.tcl,v diff -u -r1.6.2.9 -r1.6.2.10 --- openacs-4/packages/assessment/www/asm-admin/index.tcl 25 Feb 2006 15:46:24 -0000 1.6.2.9 +++ openacs-4/packages/assessment/www/asm-admin/index.tcl 7 Apr 2006 10:49:31 -0000 1.6.2.10 @@ -23,12 +23,6 @@ set sw_admin [acs_user::site_wide_admin_p -user_id $user_id] set package_admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege "admin"] -if { $sw_admin == 0} { - set m_name "get_all_assessments_admin" -} else { - set m_name "get_all_assessments" -} - #form to upload a QTI ZIP file ad_form -name form_upload_file -action {unzip-file} -html {enctype multipart/form-data} -form { {zipfile:file {label "[_ assessment.Import_QTI_ZIP_File]"}} @@ -54,7 +48,7 @@ } #get all assessments order by title -db_multirow -extend { export permissions admin_request} assessments $m_name {} { +db_multirow -extend { export permissions admin_request} assessments get_all_assessments {} { set title [as::assessment::title -title $title] set export "[_ assessment.Export]" set permissions "[_ assessment.permissions]" 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 - - - -