Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request-2.tcl 7 Sep 2005 17:44:12 -0000 1.3 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request-2.tcl 22 Oct 2005 17:05:36 -0000 1.4 @@ -10,6 +10,7 @@ @cvs-id $Id$ } { user_id:integer,notnull + session_id:integer,notnull return_url:notnull } -properties { } -validate { @@ -19,30 +20,10 @@ set assessment_id [parameter::get -parameter ApplicationAssessment -default ""] set viewing_user_id [ad_conn user_id] -if { ! [empty_string_p $assessment_id] && $assessment_id != -1 } { - set session_id [db_string session { - select ss.session_id - - from (select a.* - from as_assessmentsi a, - cr_items i - where a.assessment_id = i.latest_revision) a, - as_sessions ss - - where a.assessment_id = ss.assessment_id - and a.item_id = :assessment_id - and ss.subject_id = :viewing_user_id - - order by creation_datetime desc - - limit 1 - }] - - db_dml set_assessment_subject { - update as_sessions - set subject_id = :user_id - where session_id = :session_id - } +db_dml set_assessment_subject { + update as_sessions + set subject_id = :user_id + where session_id = :session_id } ad_returnredirect $return_url \ No newline at end of file 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.26 -r1.27 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl 10 Oct 2005 11:11:27 -0000 1.26 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl 22 Oct 2005 17:05:36 -0000 1.27 @@ -168,7 +168,7 @@ set next_url [export_vars -base $next_url { return_url }] } - set return_url [export_vars -base "[ad_conn package_url]ecommerce/application-request-2" { user_id {return_url $next_url} }] + set return_url [export_vars -base "[ad_conn package_url]ecommerce/application-request-2" { user_id session_id {return_url $next_url} }] ad_returnredirect [export_vars -base "[apm_package_url_from_id [parameter::get -parameter AssessmentPackage]]assessment" { assessment_id return_url session_id }] } on_error {