Index: openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl,v diff -u -r1.23 -r1.24 --- openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl 20 Aug 2005 18:27:54 -0000 1.23 +++ openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl 24 Aug 2005 05:01:50 -0000 1.24 @@ -210,6 +210,7 @@ } ad_proc -public dotlrn_ecommerce::section::available_slots { + -actual:boolean section_id } { Return available slots @@ -237,7 +238,11 @@ } if { ![empty_string_p $maxparticipants] } { - set attendees [dotlrn_ecommerce::section::attendees $section_id] + if { $actual_p } { + set attendees [dotlrn_ecommerce::section::attendees -actual $section_id] + } else { + set attendees [dotlrn_ecommerce::section::attendees $section_id] + } set available_slots [expr $maxparticipants - $attendees] if { $available_slots < 0 } { return 0 @@ -250,6 +255,7 @@ } ad_proc -public dotlrn_ecommerce::section::attendees { + -actual:boolean section_id } { Return number of attendees @@ -283,6 +289,10 @@ and o.order_state = 'in_basket') }]] + if { $actual_p } { + return $registered_attendees + } + set maxparticipants [dotlrn_ecommerce::section::maxparticipants $section_id] if { ! [empty_string_p $maxparticipants] } { set actual_open_slots [expr $maxparticipants - $registered_attendees] @@ -348,7 +358,7 @@ from dotlrn_ecommerce_section where community_id = :community_id }] - set available_slots [dotlrn_ecommerce::section::available_slots $section_id] + set available_slots [dotlrn_ecommerce::section::available_slots -actual $section_id] if { $available_slots > 0 } { db_foreach next_in_waiting_list [subst {