Index: openacs-4/contrib/packages/simulation/lib/cases-admin.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/cases-admin.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/lib/cases-admin.tcl 8 Jan 2004 11:23:34 -0000 1.1 +++ openacs-4/contrib/packages/simulation/lib/cases-admin.tcl 8 Jan 2004 14:24:44 -0000 1.2 @@ -18,7 +18,7 @@ label { label "Case" orderby upper(w.pretty_name) - link_url_eval {[export_vars -base [ad_conn package_url]simplay/case { case_id }]} + link_url_eval {[export_vars -base [ad_conn package_url]simplay/case-admin { case_id }]} } pretty_name { label "Simulation" 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 -r1.7 -r1.8 --- openacs-4/contrib/packages/simulation/lib/cases.tcl 7 Jan 2004 14:44:08 -0000 1.7 +++ openacs-4/contrib/packages/simulation/lib/cases.tcl 8 Jan 2004 14:24:44 -0000 1.8 @@ -11,18 +11,24 @@ } # TODO: add link to simplay/case for each case +# TODO: hide case if not admin + set package_id [ad_conn package_id] set elements { - label { - label "Case" + pretty_name { + label "Simulation" orderby upper(w.pretty_name) link_url_eval {[export_vars -base [ad_conn package_url]simplay/case { case_id }]} } - pretty_name { - label "Simulation" + label { + label "Case" orderby upper(w.pretty_name) } + role { + label "Role" + display_template { Lawyer 1 } + } status { label "Status" } 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 -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/lib/simulations-available.tcl 14 Nov 2003 14:31:41 -0000 1.1 +++ openacs-4/contrib/packages/simulation/lib/simulations-available.tcl 8 Jan 2004 14:24:44 -0000 1.2 @@ -12,30 +12,59 @@ set package_id [ad_conn package_id] + # TODO: if invited instead of open, say "accept invitation to enroll" + set elements { pretty_name { label "Simulation" orderby upper(w.pretty_name) } + description { + label "Description" + display_template { + @avail_sims.description;noquote@ + } + } + enroll { + label "Enroll" + display_template { + Self-enroll + } + } + } template::list::create \ -name avail_sims \ -multirow avail_sims \ - -no_data "No simulations available to join." \ + -no_data "No simulations available to self-enroll." \ -elements $elements -db_multirow avail_sims select_avail_sims " - select w.pretty_name +# TODO: verify that the first half of this query returns the sims to which the user is invited (data model may have changed since this was coded) +# TODO: exclude simulations for which the user is currently enrolled + +db_multirow -extend {enroll_url} avail_sims select_avail_sims " + select w.workflow_id, + w.pretty_name, + w.description, + w.description_mime_type 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 + select w.workflow_id, + w.pretty_name, + w.description, + w.description_mime_type from workflows w, sim_simulations ss - where ss.enroll_start <= now() + where ss.simulation_id = w.workflow_id + and ss.enroll_start <= now() and ss.enroll_end >= now() and ss.enroll_type = 'open' -" \ No newline at end of file +" { + set enroll_url [export_vars -base "[apm_package_url_from_id $package_id]simplay/enroll" {workflow_id} ] + set description [ad_html_text_convert -from $description_mime_type -maxlen 200 -- $description] + +} \ No newline at end of file Index: openacs-4/contrib/packages/simulation/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/Attic/index.adp,v diff -u -r1.27 -r1.28 --- openacs-4/contrib/packages/simulation/www/index.adp 16 Dec 2003 14:16:28 -0000 1.27 +++ openacs-4/contrib/packages/simulation/www/index.adp 8 Jan 2004 14:24:44 -0000 1.28 @@ -28,11 +28,14 @@

SimPlay

+

Your Current Simulations

Log in to see your active cases. +

+

Join a Simulations

Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-casting-3.adp,v diff -u -r1.9 -r1.10 --- openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-3.adp 7 Jan 2004 16:27:35 -0000 1.9 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-3.adp 8 Jan 2004 14:24:44 -0000 1.10 @@ -6,25 +6,18 @@ -

+ Each role may be played by one or by many users. Each role can only be played by users in the group - specified below. If a group is not selected for any role, user - in that group will not be cast in the simulation -

+ +

TODO: Show total number of users per case +

In Automatic casting, only - -In Automatic casting, onl - users from these groups will be assigned to the roles. All user from all selected groups will be cast. If all users for one rol @@ -53,4 +46,6 @@

TODO: Finish button should say "Done (Begin Casting)" +

TODO: Number of users should by greater than 0. + Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-edit.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/simulation/www/siminst/simulation-edit.tcl 7 Jan 2004 12:22:40 -0000 1.4 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-edit.tcl 8 Jan 2004 14:24:44 -0000 1.5 @@ -4,6 +4,8 @@ workflow_id:integer } +# TODO: finish implementing description field (I cut-paste from template-edit.tcl and may have left out stuff) + simulation::template::get -workflow_id $workflow_id -array sim_template ad_form -export { workflow_id } -name simulation -form { @@ -20,6 +22,13 @@ {case_end:date,to_sql(ansi),from_sql(ansi),optional {label "Simulation end date"} } + {description:richtext(richtext),optional + {label "Description"} + {html {cols 60 rows 8}} + {help_text "This description is visible to users during enrollment."} + } +} -edit_request { + set description [template::util::richtext::create $simulation(description) $simulation(description_mime_type)] } -on_request { foreach elm { @@ -45,6 +54,9 @@ set case_end [clock format [expr [clock seconds] + 4*$one_month] -format "%Y-%m-%d"] } } -on_submit { + set description_mime_type [template::util::richtext::get_property format $description] + set description [template::util::richtext::get_property contents $description] + set unique_p [simulation::template::pretty_name_unique_p \ -workflow_id $workflow_id \ -package_id [ad_conn package_id] \ @@ -58,7 +70,7 @@ foreach elm { send_start_note_date case_start case_end pretty_name } { set row($elm) [set $elm] } - + simulation::template::edit \ -workflow_id $workflow_id \ -array row Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-participants.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.adp 7 Jan 2004 16:27:35 -0000 1.2 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.adp 8 Jan 2004 14:24:44 -0000 1.3 @@ -4,6 +4,15 @@ +

TODO: figure out when to execute auto-enrollment (and update the + help text below). choices: +

Auto-Enroll takes effect, and invitations are sent, when this wizard is completed and casting begins.

Index: openacs-4/contrib/packages/simulation/www/simplay/case-admin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/case-admin.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/simplay/case-admin.adp 8 Jan 2004 14:27:56 -0000 1.1 @@ -0,0 +1,52 @@ + + @title;noquote@ + @context;noquote@ + + + + + + + + + + + + + + + + + + + + +
+ Case # + + Current Users + +
+ Case #1 + + Bob +
______ +
+ +
+ Case #2 + + Lokman +
Peter +
+
+
+
+ +If no rows, display this text: "There are no cases yet." +

+After clicking join, redirect back to this page. Hide all buttons. +Show new text at the bottom: "You are participating in this simulation +as a player in case #X. Your role will be determined when the +simulation begins. The simulation will start XXX." \ No newline at end of file Index: openacs-4/contrib/packages/simulation/www/simplay/case-admin.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/case-admin.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/simplay/case-admin.tcl 8 Jan 2004 14:27:56 -0000 1.1 @@ -0,0 +1,11 @@ +ad_page_contract { + This page allows users to choose which group to join. It is only relevant for simulations with casting type of group. +} { + {case_id:integer ""} +} + +set title "Administer" +set context [list [list . "SimPlay"] [list [export_vars -base case { case_id }] "Case CASENAME"] $title] +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set section_uri [apm_package_url_from_id $package_id]simplay/ Index: openacs-4/contrib/packages/simulation/www/simplay/cast.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/cast.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/simplay/cast.adp 8 Jan 2004 14:27:56 -0000 1.1 @@ -0,0 +1,96 @@ + + @title;noquote@ + @context;noquote@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Case # + + Role + + Current Users + + Available
Slots +
+
+ Case #1 + + Lawyer for Defendant + + Bob + + 1 + + +
+ Lawyer for Plaintiff + + Jeroen +
Philip +
Elvis +
+ FULL + +
+ Case #2 + + Lawyer for Defendant + + Bob + + 1 + + +
+ Lawyer for Plaintiff + + empty + + 3 + + +
+
+ +

+If no rows, display this text: "There are no cases yet." +

+After clicking join, redirect back to this page. Hide all buttons. +Show new text at the bottom: "You are participating in this simulation +as a player in case #X. The simulation will start XXX." +

If casting type is group instead of open, do not display or group +by the role column. \ No newline at end of file Index: openacs-4/contrib/packages/simulation/www/simplay/cast.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/cast.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/simplay/cast.tcl 8 Jan 2004 14:27:56 -0000 1.1 @@ -0,0 +1,11 @@ +ad_page_contract { + This page allows users to choose which group to join. It is only relevant for simulations with casting type of group. +} { + {case_id:integer ""} +} + +set title "Join a Case in Simulation SIMNAME" +set context [list $title] +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set section_uri [apm_package_url_from_id $package_id]simplay/ Index: openacs-4/contrib/packages/simulation/www/simplay/control-bar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/control-bar.adp,v diff -u -r1.8 -r1.9 --- openacs-4/contrib/packages/simulation/www/simplay/control-bar.adp 7 Jan 2004 14:46:04 -0000 1.8 +++ openacs-4/contrib/packages/simulation/www/simplay/control-bar.adp 8 Jan 2004 14:24:44 -0000 1.9 @@ -1,18 +1,19 @@ -

Your Options

+
You are Bernadette (Plaintiff) + + +

Your Options

-

TODO: link Archive to "portfolio" of all objects this actor owns - (since the actor is specific to role and case, these are objects in the same case) -

TODO: Link "about this simulation" to something -

Your Roles

- +

TODO: Link "about this simulation" to simplay/about-sim?sim_id= +

Contactss