Index: openacs-4/packages/survey-portlet/www/survey-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey-portlet/www/survey-portlet.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/survey-portlet/www/survey-portlet.tcl 14 May 2003 21:07:00 -0000 1.1 +++ openacs-4/packages/survey-portlet/www/survey-portlet.tcl 13 Jan 2005 13:58:50 -0000 1.2 @@ -19,9 +19,14 @@ set shaded_p $config(shaded_p) set list_of_package_ids $config(package_id) -set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0] -set can_read_private_data_p [acs_privacy::user_can_read_private_data_p -object_id [ad_conn package_id]] set user_id [ad_conn user_id] -db_multirow surveys select_surveys {} - - +set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0] +set readable_surveys_p 0 +set count 0 +db_multirow -extend {can_read_private_data_p} surveys select_surveys {} { + set can_read_private_data_p [acs_privacy::user_can_read_private_data_p -object_id $package_id] + if { $can_read_private_data_p } { + set readable_surveys_p 1 + } + incr count +}