Index: openacs-4/contrib/packages/simulation/www/simplay/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/index.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/simulation/www/simplay/index.tcl 18 Dec 2003 14:07:02 -0000 1.4 +++ openacs-4/contrib/packages/simulation/www/simplay/index.tcl 5 Jan 2004 13:55:08 -0000 1.5 @@ -11,3 +11,16 @@ set section_uri [apm_package_url_from_id $package_id]simplay/ set adminplayer_p [permission::permission_p -object_id $package_id -privilege sim_adminplayer] + +set case_count [db_string case_count { + select count(distinct wc.case_id) + from workflow_cases wc, + workflow_case_role_party_map wcrpm + where wcrpm.party_id = :user_id + and wc.case_id = wcrpm.case_id +}] + +if { $case_count == "1" } { + ad_returnredirect [export_vars -base case { case_id }] + ad_script_abort +} \ No newline at end of file Index: openacs-4/packages/simulation/www/simplay/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/index.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/simulation/www/simplay/index.tcl 18 Dec 2003 14:07:02 -0000 1.4 +++ openacs-4/packages/simulation/www/simplay/index.tcl 5 Jan 2004 13:55:08 -0000 1.5 @@ -11,3 +11,16 @@ set section_uri [apm_package_url_from_id $package_id]simplay/ set adminplayer_p [permission::permission_p -object_id $package_id -privilege sim_adminplayer] + +set case_count [db_string case_count { + select count(distinct wc.case_id) + from workflow_cases wc, + workflow_case_role_party_map wcrpm + where wcrpm.party_id = :user_id + and wc.case_id = wcrpm.case_id +}] + +if { $case_count == "1" } { + ad_returnredirect [export_vars -base case { case_id }] + ad_script_abort +} \ No newline at end of file