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.5 -r1.6 --- openacs-4/packages/simulation/www/simplay/index.tcl 5 Jan 2004 13:55:08 -0000 1.5 +++ openacs-4/packages/simulation/www/simplay/index.tcl 5 Jan 2004 14:09:33 -0000 1.6 @@ -12,15 +12,15 @@ 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) +set case_list [db_list case_count { + select 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 }] +if { [llength $case_list] == 1 } { + ad_returnredirect [export_vars -base case { {case_id {[lindex $case_list 0]}} }] ad_script_abort -} \ No newline at end of file +}