Index: openacs-4/packages/assessment/tcl/as-checks-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs.tcl,v
diff -u -r1.24.2.8 -r1.24.2.9
--- openacs-4/packages/assessment/tcl/as-checks-procs.tcl 3 Aug 2005 05:51:16 -0000 1.24.2.8
+++ openacs-4/packages/assessment/tcl/as-checks-procs.tcl 20 Sep 2005 15:55:24 -0000 1.24.2.9
@@ -20,7 +20,7 @@
set package_id [ad_conn package_id]
set user_id [ad_conn user_id]
set permission ""
- if {[permission::permission_p -object_id $package_id -party_id $user_id -privilege admin] == 0} {
+ if {![acs_user::site_wide_admin_p -user_id $user_id]} {
set permission "and ci.item_id in (select object_id from acs_permissions where grantee_id=:user_id and privilege='admin')"}
set assessment_list [list [list "[_ assessment.all]" "all"]]
set assessments [db_list_of_lists assessment {}]
Index: openacs-4/packages/assessment/www/asm-admin/admin-request.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/admin-request.tcl,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/assessment/www/asm-admin/admin-request.tcl 4 Feb 2005 21:14:22 -0000 1.1
+++ openacs-4/packages/assessment/www/asm-admin/admin-request.tcl 20 Sep 2005 15:54:56 -0000 1.1.2.1
@@ -39,17 +39,25 @@
set assessment_query ""
set state_query ""
+if {![acs_user::site_wide_admin_p -user_id [ad_conn user_id]]} {
+ set permission "and c.assessment_id in (select object_id from acs_permissions where grantee_id=:party_id and privilege='admin')"
+}
if {[exists_and_not_null assessment] && $assessment!="all"} {
permission::require_permission -object_id $assessment -privilege admin
- if {[permission::permission_p -object_id $package_id -party_id $party_id -privilege admin] == 0} {
- set permission "and c.assessment_id in (select object_id from acs_permissions where grantee_id=:party_id and privilege='admin')"}
as::assessment::data -assessment_id $assessment
set d_assessment $assessment
set new_assessment_revision $assessment_data(assessment_rev_id)
set assessment_query "and c.section_id_from in (select s.section_id from as_sections s, cr_revisions cr, cr_items ci, as_assessment_section_map asm where ci.item_id = cr.item_id and cr.revision_id = s.section_id and s.section_id = asm.section_id and asm.assessment_id = :new_assessment_revision)"
-}
+} else {
+
+ set assessment_query "and assessment_id in (select ci.item_id as assessment_i
+ from cr_folders cf, cr_items ci, cr_revisions cr, as_assessments a
+ where cr.revision_id = ci.latest_revision
+ and a.assessment_id = cr.revision_id
+ and ci.parent_id = cf.folder_id and cf.package_id = :package_id)"
+}
if {[exists_and_not_null state]} {
set d_state $state
@@ -181,3 +189,4 @@
}
+
Index: openacs-4/packages/assessment/www/asm-admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/index.adp,v
diff -u -r1.4.2.1 -r1.4.2.2
--- openacs-4/packages/assessment/www/asm-admin/index.adp 10 Jun 2005 18:53:31 -0000 1.4.2.1
+++ openacs-4/packages/assessment/www/asm-admin/index.adp 20 Sep 2005 15:54:56 -0000 1.4.2.2
@@ -4,7 +4,7 @@
#assessment.admin_categories#
-| #assessment.admin_actions# | #assessment.admin_requests# | #assessment.permissions#
+| #assessment.admin_actions# | #assessment.admin_requests# | #assessment.permissions#
#assessment.admin_requests#