Mark the users who were present for $task_name on $cal_item_info(full_start_date)
" set elements { @@ -32,42 +30,23 @@ } } -set custom_fields [parameter::get -package_id [apm_package_id_from_key dotlrn-ecommerce] -parameter CustomParticipantFields -default ""] - -if { [lsearch $custom_fields allergies] != -1 } { - lappend elements medical_needs { - label "Medical Needs" - } -} - -if { [lsearch $custom_fields special_needs] != -1 } { - lappend elements special_issues { - label "Special Issues" - } -} - lappend elements present { label "Present" display_template { checked> } } - template::list::create \ -name eval_members \ -multirow eval_members \ -elements $elements set users [dotlrn_community::list_users $community_id] -template::multirow create eval_members user_id member_name medical_needs special_issues present +template::multirow create eval_members user_id member_name present -ns_log Notice " ** $users ** " - foreach user $users { - set medical_needs [db_string "get_medical_issues" "select allergies from person_info where person_id =[ns_set get $user user_id]" -default ""] - set special_issues [db_string "get_special_issues" "select special_needs from person_info where person_id = [ns_set get $user user_id]" -default ""] set present [db_0or1row "checkattendance" "select user_id from attendance_cal_item_map where cal_item_id = :cal_item_id and user_id = [ns_set get $user user_id]"] - template::multirow append eval_members "[ns_set get $user user_id]" "[ns_set get $user first_names] [ns_set get $user last_name]" "$medical_needs" "$special_issues" "$present" + template::multirow append eval_members "[ns_set get $user user_id]" "[ns_set get $user first_names] [ns_set get $user last_name]" "$present" } ad_return_template Index: openacs-4/packages/attendance/www/admin/print.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attendance/www/admin/print.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/attendance/www/admin/print.tcl 3 Oct 2005 15:26:02 -0000 1.3 +++ openacs-4/packages/attendance/www/admin/print.tcl 27 Feb 2006 05:48:50 -0000 1.4 @@ -22,26 +22,10 @@ calendar::item::get -cal_item_id $cal_item_id -array cal_item_info -# set due_date_pretty [lc_time_fmt $due_date "%q %r"] - set message "Attendance for $task_name on $cal_item_info(full_start_date)
" set elements {member_name {label "Member Name"}} -set custom_fields [parameter::get -package_id [apm_package_id_from_key dotlrn-ecommerce] -parameter CustomParticipantFields -default ""] - -if { [lsearch $custom_fields allergies] != -1 } { - lappend elements medical_needs { - label "Medical Needs" - } -} - -if { [lsearch $custom_fields special_needs] != -1 } { - lappend elements special_issues { - label "Special Issues" - } -} - append elements { present { label "Present" display_template { checked> } @@ -54,13 +38,9 @@ set users [dotlrn_community::list_users $community_id] -template::multirow create eval_members user_id member_name medical_needs special_issues present +template::multirow create eval_members user_id member_name present -ns_log Notice " ** $users ** " - foreach user $users { - set medical_needs [db_string "get_medical_issues" "select allergies from person_info where person_id =[ns_set get $user user_id]" -default ""] - set special_issues [db_string "get_special_issues" "select special_needs from person_info where person_id = [ns_set get $user user_id]" -default ""] set present [db_0or1row "checkattendance" "select user_id from attendance_cal_item_map where cal_item_id = :cal_item_id and user_id = [ns_set get $user user_id]"] - template::multirow append eval_members "[ns_set get $user user_id]" "[ns_set get $user first_names] [ns_set get $user last_name]" "$medical_needs" "$special_issues" "$present" + template::multirow append eval_members "[ns_set get $user user_id]" "[ns_set get $user first_names] [ns_set get $user last_name]" "$present" }