Index: openacs-4/packages/dotlrn-ecommerce/www/admin/process-purchase-course.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/process-purchase-course.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/dotlrn-ecommerce/www/admin/process-purchase-course.tcl 22 Aug 2005 17:48:09 -0000 1.19 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/process-purchase-course.tcl 6 Sep 2005 01:12:11 -0000 1.20 @@ -30,6 +30,7 @@ } -errors { } + # Proc to be used in form validation proc already_registered_p { section_id purchaser_id participant_id } { if { [empty_string_p $section_id] } { @@ -44,11 +45,13 @@ set user_id [ad_decode $participant_id 0 $purchaser_id $participant_id] + # if they are in approved state, then let the registration pass return [db_string registered { select count(*) from dotlrn_member_rels_full where community_id = :community_id and user_id = :user_id + and member_state not in ('request approved', 'waitinglist approved') }] }