Index: openacs-4/contrib/packages/simulation/lib/cases.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/cases.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/lib/cases.adp 14 Nov 2003 14:31:41 -0000 1.1
@@ -0,0 +1 @@
+
Index: openacs-4/contrib/packages/simulation/lib/cases.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/cases.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/lib/cases.tcl 14 Nov 2003 14:31:41 -0000 1.1
@@ -0,0 +1,37 @@
+simulation::include_contract {
+ Displays a list of cases for the specified user.
+
+ @author Joel Aufrecht
+ @creation-date 2003-11-12
+ @cvs-id $Id: cases.tcl,v 1.1 2003/11/14 14:31:41 joela Exp $
+} {
+ party_id {
+ default_value ""
+ }
+}
+
+set package_id [ad_conn package_id]
+
+set elements {
+ pretty_name {
+ label "Cases"
+ orderby upper(w.pretty_name)
+ }
+}
+
+template::list::create \
+ -name cases \
+ -multirow cases \
+ -no_data "You are not in any active simulation cases." \
+ -elements $elements
+
+db_multirow cases select_cases "
+ select w.pretty_name
+ from workflows w,
+ workflow_cases wc,
+ workflow_case_role_party_map wcrpm
+ where w.workflow_id = wc.workflow_id
+ and wc.case_id = wcrpm.case_id
+ and wcrpm.party_id = :party_id
+ [template::list::orderby_clause -orderby -name "cases"]
+"
\ No newline at end of file
Index: openacs-4/contrib/packages/simulation/lib/simulations-available.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/simulations-available.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/lib/simulations-available.adp 14 Nov 2003 14:31:41 -0000 1.1
@@ -0,0 +1 @@
+
Index: openacs-4/contrib/packages/simulation/lib/simulations-available.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/simulations-available.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/lib/simulations-available.tcl 14 Nov 2003 14:31:41 -0000 1.1
@@ -0,0 +1,41 @@
+simulation::include_contract {
+ Displays a list of available simulations
+
+ @author Joel Aufrecht
+ @creation-date 2003-11-12
+ @cvs-id $Id: simulations-available.tcl,v 1.1 2003/11/14 14:31:41 joela Exp $
+} {
+ party_id {
+ default_value ""
+ }
+}
+
+set package_id [ad_conn package_id]
+
+set elements {
+ pretty_name {
+ label "Simulation"
+ orderby upper(w.pretty_name)
+ }
+}
+
+template::list::create \
+ -name avail_sims \
+ -multirow avail_sims \
+ -no_data "No simulations available to join." \
+ -elements $elements
+
+db_multirow avail_sims select_avail_sims "
+ select w.pretty_name
+ from workflows w,
+ sim_party_sim_map spsm
+ where w.workflow_id = spsm.simulation_id
+ and spsm.simulation_id = :party_id
+ UNION
+ select w.pretty_name
+ from workflows w,
+ sim_simulations ss
+ where ss.enroll_start <= now()
+ and ss.enroll_end >= now()
+ and ss.enroll_type = 'open'
+"
\ No newline at end of file
Index: openacs-4/packages/simulation/lib/cases.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/cases.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/lib/cases.adp 14 Nov 2003 14:31:41 -0000 1.1
@@ -0,0 +1 @@
+
Index: openacs-4/packages/simulation/lib/cases.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/cases.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/lib/cases.tcl 14 Nov 2003 14:31:41 -0000 1.1
@@ -0,0 +1,37 @@
+simulation::include_contract {
+ Displays a list of cases for the specified user.
+
+ @author Joel Aufrecht
+ @creation-date 2003-11-12
+ @cvs-id $Id: cases.tcl,v 1.1 2003/11/14 14:31:41 joela Exp $
+} {
+ party_id {
+ default_value ""
+ }
+}
+
+set package_id [ad_conn package_id]
+
+set elements {
+ pretty_name {
+ label "Cases"
+ orderby upper(w.pretty_name)
+ }
+}
+
+template::list::create \
+ -name cases \
+ -multirow cases \
+ -no_data "You are not in any active simulation cases." \
+ -elements $elements
+
+db_multirow cases select_cases "
+ select w.pretty_name
+ from workflows w,
+ workflow_cases wc,
+ workflow_case_role_party_map wcrpm
+ where w.workflow_id = wc.workflow_id
+ and wc.case_id = wcrpm.case_id
+ and wcrpm.party_id = :party_id
+ [template::list::orderby_clause -orderby -name "cases"]
+"
\ No newline at end of file
Index: openacs-4/packages/simulation/lib/simulations-available.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/simulations-available.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/lib/simulations-available.adp 14 Nov 2003 14:31:41 -0000 1.1
@@ -0,0 +1 @@
+
Index: openacs-4/packages/simulation/lib/simulations-available.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/simulations-available.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/lib/simulations-available.tcl 14 Nov 2003 14:31:41 -0000 1.1
@@ -0,0 +1,41 @@
+simulation::include_contract {
+ Displays a list of available simulations
+
+ @author Joel Aufrecht
+ @creation-date 2003-11-12
+ @cvs-id $Id: simulations-available.tcl,v 1.1 2003/11/14 14:31:41 joela Exp $
+} {
+ party_id {
+ default_value ""
+ }
+}
+
+set package_id [ad_conn package_id]
+
+set elements {
+ pretty_name {
+ label "Simulation"
+ orderby upper(w.pretty_name)
+ }
+}
+
+template::list::create \
+ -name avail_sims \
+ -multirow avail_sims \
+ -no_data "No simulations available to join." \
+ -elements $elements
+
+db_multirow avail_sims select_avail_sims "
+ select w.pretty_name
+ from workflows w,
+ sim_party_sim_map spsm
+ where w.workflow_id = spsm.simulation_id
+ and spsm.simulation_id = :party_id
+ UNION
+ select w.pretty_name
+ from workflows w,
+ sim_simulations ss
+ where ss.enroll_start <= now()
+ and ss.enroll_end >= now()
+ and ss.enroll_type = 'open'
+"
\ No newline at end of file