Index: openacs-4/contrib/packages/simulation/www/simplay/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/index.adp,v
diff -u -r1.13 -r1.14
--- openacs-4/contrib/packages/simulation/www/simplay/index.adp 5 Jan 2004 12:33:41 -0000 1.13
+++ openacs-4/contrib/packages/simulation/www/simplay/index.adp 5 Jan 2004 14:09:33 -0000 1.14
@@ -2,10 +2,6 @@
@title;noquote@
@context;noquote@
-
- Show list of cases and make user pick one before proceeding. However, if there is only one valid case, use it.
-
-
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.5 -r1.6
--- openacs-4/contrib/packages/simulation/www/simplay/index.tcl 5 Jan 2004 13:55:08 -0000 1.5
+++ openacs-4/contrib/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
+}
Index: openacs-4/packages/simulation/www/simplay/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/index.adp,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/simulation/www/simplay/index.adp 5 Jan 2004 12:33:41 -0000 1.13
+++ openacs-4/packages/simulation/www/simplay/index.adp 5 Jan 2004 14:09:33 -0000 1.14
@@ -2,10 +2,6 @@
@title;noquote@
@context;noquote@
-
- Show list of cases and make user pick one before proceeding. However, if there is only one valid case, use it.
-
-
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
+}