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 Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/prerequisite-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/prerequisite-confirm.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/prerequisite-confirm.tcl 25 Jul 2005 18:19:21 -0000 1.5 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/prerequisite-confirm.tcl 18 Aug 2005 18:40:37 -0000 1.6 @@ -94,4 +94,4 @@ ad_script_abort } -set request_url [export_vars -base application-request { participant_id community_id {type prereq} {next_url $return_url} }] +set request_url [export_vars -base application-request { user_id participant_id community_id {type prereq} {next_url $return_url} }] Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl 17 Aug 2005 17:13:49 -0000 1.14 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl 18 Aug 2005 18:40:37 -0000 1.15 @@ -95,7 +95,7 @@ }] } { if { ! [empty_string_p $assessment_id] && $assessment_id != -1 } { set return_url [export_vars -base "[ad_conn package_url]application-confirm" { product_id {member_state "awaiting payment"} }] - ad_returnredirect [export_vars -base application-request { participant_id community_id {next_url $return_url} { type payment } }] + ad_returnredirect [export_vars -base application-request { user_id participant_id community_id {next_url $return_url} { type payment } }] ad_script_abort } Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/waiting-list-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/waiting-list-confirm.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/waiting-list-confirm.tcl 11 Aug 2005 01:03:09 -0000 1.3 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/waiting-list-confirm.tcl 18 Aug 2005 18:40:37 -0000 1.4 @@ -35,7 +35,7 @@ } # See if we need to check for prerequisites -set request_url [export_vars -base application-request { participant_id community_id {next_url $return_url} }] +set request_url [export_vars -base application-request { user_id participant_id community_id {next_url $return_url} }] set allow_override_p [parameter::get -parameter AdminCanOverrideWaitingListP -default 1]