Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl 8 Aug 2005 13:10:07 -0000 1.13 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl 18 Aug 2005 18:40:37 -0000 1.14 @@ -4,11 +4,12 @@ Hold slot and request for approval - @author (mgh@localhost.localdomain) + @author Roel Canicula (roelmc@pldtdsl.net) @creation-date 2005-07-08 @arch-tag: 5e4b382d-9d71-4e7a-90e2-47948170d6a7 @cvs-id $Id$ } { + user_id:integer,notnull,optional participant_id:integer,notnull community_id:integer,notnull {type full} @@ -122,6 +123,15 @@ } } } + + # Set the rel_id's creation user to the purchaser + if { [info exists user_id] && $user_id != [ad_conn user_id] } { + db_dml set_purchaser { + update acs_objects + set creation_user = :user_id + where object_id = :rel_id + } + } } dotlrn_ecommerce::section::flush_cache -user_id $participant_id $section_id