Index: openacs-4/contrib/packages/simulation/tcl/simulation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/tcl/Attic/simulation-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/contrib/packages/simulation/tcl/simulation-procs.tcl 12 Nov 2003 13:14:07 -0000 1.9 +++ openacs-4/contrib/packages/simulation/tcl/simulation-procs.tcl 13 Nov 2003 12:19:49 -0000 1.10 @@ -231,43 +231,26 @@ ad_proc -public simulation::role::new { {-template_id:required} - {-character_id:required} - {-role_short_name ""} - {-role_pretty_name ""} + {-role_short_name:required} + {-role_pretty_name:required} } { - Create a new simulation role for a given simulation template - and character. Will map the character to the template if this + Create a new simulation role for a given simulation template. + Will map the character to the template if this is not already done. @author Peter Marklund } { - # Set default values for names - if { [empty_string_p $role_short_name] || [empty_string_p $role_pretty_name] } { - set character_name [simulation::character::get_element \ - -character_id $character_id \ - -element title] - } - if { [empty_string_p $role_short_name] } { - set role_short_name $character_name - } - if { [empty_string_p $role_pretty_name] } { - set role_pretty_name $character_name - } - db_transaction { - simulation::template::associate_object \ - -template_id $template_id \ - -object_id $character_id - # create the role set role_id [workflow::role::new \ -workflow_id $template_id \ -short_name $role_short_name \ -pretty_name $role_pretty_name] + # and then add extra data for simulation db_dml set_role_character { - insert into sim_roles - values (:role_id, :character_id) + insert into sim_roles (role_id) + values (:role_id) } } } 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.16 -r1.17 --- openacs-4/contrib/packages/simulation/www/index.adp 12 Nov 2003 15:24:03 -0000 1.16 +++ openacs-4/contrib/packages/simulation/www/index.adp 13 Nov 2003 12:19:50 -0000 1.17 @@ -1,6 +1,6 @@
-

SIMPLAY

+

SIMPLAY

Your live cases:

Available simulations @@ -37,6 +37,5 @@
-

SIMINST

+

SIMINST

- Index: openacs-4/contrib/packages/simulation/www/role-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/Attic/role-edit.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/simulation/www/role-edit.tcl 12 Nov 2003 14:51:16 -0000 1.5 +++ openacs-4/contrib/packages/simulation/www/role-edit.tcl 13 Nov 2003 12:19:50 -0000 1.6 @@ -24,20 +24,6 @@ set package_key [ad_conn package_key] set package_id [ad_conn package_id] -#--------------------------------------------------------------------- -# Get a list of relevant characters -#--------------------------------------------------------------------- -# deliberately not checking to see if character is already cast in sim -# because no reason not to have same character in multiple roles (?) - -set char_options [db_list_of_lists character_option_list { - select ci.name, - ci.item_id - from cr_items ci - where ci.content_type = 'sim_character' - order by upper(ci.name) - }] - ###################################################################### # # role @@ -55,10 +41,6 @@ ad_form -name role -cancel_url sim-template-list -form { {role_id:key} {workflow_id:integer(hidden),optional} - {character_id:text(select) - {label "Character"} - {options $char_options} - } {name:text {label "Role Name"} {html {size 20}} @@ -78,7 +60,6 @@ simulation::role::new \ -template_id $workflow_id \ - -character_id $character_id \ -role_short_name $name \ -role_pretty_name $name @@ -89,4 +70,3 @@ # maybe replace this chunk of copied text with an includable template # which passes in a filter for the workflow_id? - Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/simulation-list.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/simulation-list.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/simulation-new-2.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/simulation-new-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/simulation-new.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/simulation-new.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/simulation/www/siminst/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/siminst/index.adp 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,27 @@ + + @page_title;noquote@ + @context;noquote@ + +List of eligible templates for instantiation. : +
+select workflow_id,
+       suggested_duration,
+       pretty_name
+       (...) as number_of_roles
+       () as min_number_of_human_roles
+
+Each record has a Instantiate this template
+
+from workflows
+where ready_p = 't'
+
+ +

+Sort and filter based on "expected duration" and number +of roles. Possibly also show "number of roles that can't be played by +an agent" (as "min # of humans") +

+ +

+ TODO: Show a list of simulations with no cases so that you can continue working on one that was partially instantiated. +

Index: openacs-4/contrib/packages/simulation/www/siminst/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/siminst/index.tcl 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,7 @@ +ad_page_contract { + List active simulations. +} + +set page_title "Choose a template" +set context [list $page_title] +set package_id [ad_conn package_id] Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-casting.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-casting.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-casting.adp 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,33 @@ + + @page_title;noquote@ + @context;noquote@ + +
+Casting.
+  There is a single table for setting both characters and casting of
+  roles (combining two pages in the mockups).  Each row is a single
+  role from the template.  the columns are:
+
+  a) Role Name
+
+  b) A dropdown showing all characters
+
+  c) A dropdown showing
+    i) If the role has been set up in SIMINST with all of the
+        necessary agent responses, "Automatic Agent"
+
+    There is an admin page for the package where the professor
+    can designate groups "not castable", "cast up to one", "cast
+    up to two", etc (to 10?).
+
+    ii) A list of all groups within the package except those marked
+        "not castable"
+
+    iii) For each group so castable greater than one, extra rows:
+          "Two students", "Three Students" etc
+
+ + +

+ Create and cast cases (store characters in sim_roles table.) +

\ No newline at end of file Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-casting.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-casting.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-casting.tcl 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,9 @@ +ad_page_contract { + Create a new simulation +} + +set page_title "Simulation Casting" +set context [list $page_title] +set package_id [ad_conn package_id] + + Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-edit.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-edit.adp 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,18 @@ + + @page_title;noquote@ + @context;noquote@ + +Form: +

Specify +

    +
  • enrollment start +
  • enrollment end +
  • notification of sim start ??? what's this +
  • Simstart date +
  • simend date +
  • Open Enrollment? +
  • Open casting? +
  • tools for enrollment and casting. (upload of user list csv, ... others?) +
+ +

Create (clone the template and create a new simulation record) 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-edit.tcl 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,7 @@ +ad_page_contract { + Create/edit a simulation +} + +set page_title "Create/edit simulation" +set context [list $page_title] +set package_id [ad_conn package_id] 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/simplay/index.adp 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,11 @@ + + @page_title;noquote@ + @context;noquote@ + +

+ To-do: show all active simulations (records in sim_simulation), +including number of cases (records in workflow_cases that are related +to a sim_simulation via the extension table sim_workflow_cases). + +List of currently active simulation cases: +

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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/simplay/index.tcl 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,7 @@ +ad_page_contract { + Simplay index page. +} + +set page_title "SimPlay" +set context [list $page_title] +set package_id [ad_conn package_id] Index: openacs-4/packages/simulation/tcl/simulation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/tcl/simulation-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/simulation/tcl/simulation-procs.tcl 12 Nov 2003 13:14:07 -0000 1.9 +++ openacs-4/packages/simulation/tcl/simulation-procs.tcl 13 Nov 2003 12:19:49 -0000 1.10 @@ -231,43 +231,26 @@ ad_proc -public simulation::role::new { {-template_id:required} - {-character_id:required} - {-role_short_name ""} - {-role_pretty_name ""} + {-role_short_name:required} + {-role_pretty_name:required} } { - Create a new simulation role for a given simulation template - and character. Will map the character to the template if this + Create a new simulation role for a given simulation template. + Will map the character to the template if this is not already done. @author Peter Marklund } { - # Set default values for names - if { [empty_string_p $role_short_name] || [empty_string_p $role_pretty_name] } { - set character_name [simulation::character::get_element \ - -character_id $character_id \ - -element title] - } - if { [empty_string_p $role_short_name] } { - set role_short_name $character_name - } - if { [empty_string_p $role_pretty_name] } { - set role_pretty_name $character_name - } - db_transaction { - simulation::template::associate_object \ - -template_id $template_id \ - -object_id $character_id - # create the role set role_id [workflow::role::new \ -workflow_id $template_id \ -short_name $role_short_name \ -pretty_name $role_pretty_name] + # and then add extra data for simulation db_dml set_role_character { - insert into sim_roles - values (:role_id, :character_id) + insert into sim_roles (role_id) + values (:role_id) } } } Index: openacs-4/packages/simulation/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/index.adp,v diff -u -r1.16 -r1.17 --- openacs-4/packages/simulation/www/index.adp 12 Nov 2003 15:24:03 -0000 1.16 +++ openacs-4/packages/simulation/www/index.adp 13 Nov 2003 12:19:50 -0000 1.17 @@ -1,6 +1,6 @@
-

SIMPLAY

+

SIMPLAY

Your live cases:

Available simulations @@ -37,6 +37,5 @@
- Index: openacs-4/packages/simulation/www/role-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/Attic/role-edit.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/simulation/www/role-edit.tcl 12 Nov 2003 14:51:16 -0000 1.5 +++ openacs-4/packages/simulation/www/role-edit.tcl 13 Nov 2003 12:19:50 -0000 1.6 @@ -24,20 +24,6 @@ set package_key [ad_conn package_key] set package_id [ad_conn package_id] -#--------------------------------------------------------------------- -# Get a list of relevant characters -#--------------------------------------------------------------------- -# deliberately not checking to see if character is already cast in sim -# because no reason not to have same character in multiple roles (?) - -set char_options [db_list_of_lists character_option_list { - select ci.name, - ci.item_id - from cr_items ci - where ci.content_type = 'sim_character' - order by upper(ci.name) - }] - ###################################################################### # # role @@ -55,10 +41,6 @@ ad_form -name role -cancel_url sim-template-list -form { {role_id:key} {workflow_id:integer(hidden),optional} - {character_id:text(select) - {label "Character"} - {options $char_options} - } {name:text {label "Role Name"} {html {size 20}} @@ -78,7 +60,6 @@ simulation::role::new \ -template_id $workflow_id \ - -character_id $character_id \ -role_short_name $name \ -role_pretty_name $name @@ -89,4 +70,3 @@ # maybe replace this chunk of copied text with an includable template # which passes in a filter for the workflow_id? - Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/simulation-list.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/simulation-list.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/simulation-new-2.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/simulation-new-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/simulation-new.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/simulation-new.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/simulation/www/siminst/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/siminst/index.adp 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,27 @@ + + @page_title;noquote@ + @context;noquote@ + +List of eligible templates for instantiation. : +
+select workflow_id,
+       suggested_duration,
+       pretty_name
+       (...) as number_of_roles
+       () as min_number_of_human_roles
+
+Each record has a Instantiate this template
+
+from workflows
+where ready_p = 't'
+
+ +

+Sort and filter based on "expected duration" and number +of roles. Possibly also show "number of roles that can't be played by +an agent" (as "min # of humans") +

+ +

+ TODO: Show a list of simulations with no cases so that you can continue working on one that was partially instantiated. +

Index: openacs-4/packages/simulation/www/siminst/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/siminst/index.tcl 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,7 @@ +ad_page_contract { + List active simulations. +} + +set page_title "Choose a template" +set context [list $page_title] +set package_id [ad_conn package_id] Index: openacs-4/packages/simulation/www/siminst/simulation-casting.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-casting.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/siminst/simulation-casting.adp 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,33 @@ + + @page_title;noquote@ + @context;noquote@ + +
+Casting.
+  There is a single table for setting both characters and casting of
+  roles (combining two pages in the mockups).  Each row is a single
+  role from the template.  the columns are:
+
+  a) Role Name
+
+  b) A dropdown showing all characters
+
+  c) A dropdown showing
+    i) If the role has been set up in SIMINST with all of the
+        necessary agent responses, "Automatic Agent"
+
+    There is an admin page for the package where the professor
+    can designate groups "not castable", "cast up to one", "cast
+    up to two", etc (to 10?).
+
+    ii) A list of all groups within the package except those marked
+        "not castable"
+
+    iii) For each group so castable greater than one, extra rows:
+          "Two students", "Three Students" etc
+
+ + +

+ Create and cast cases (store characters in sim_roles table.) +

\ No newline at end of file Index: openacs-4/packages/simulation/www/siminst/simulation-casting.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-casting.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/siminst/simulation-casting.tcl 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,9 @@ +ad_page_contract { + Create a new simulation +} + +set page_title "Simulation Casting" +set context [list $page_title] +set package_id [ad_conn package_id] + + Index: openacs-4/packages/simulation/www/siminst/simulation-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-edit.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/siminst/simulation-edit.adp 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,18 @@ + + @page_title;noquote@ + @context;noquote@ + +Form: +

Specify +

    +
  • enrollment start +
  • enrollment end +
  • notification of sim start ??? what's this +
  • Simstart date +
  • simend date +
  • Open Enrollment? +
  • Open casting? +
  • tools for enrollment and casting. (upload of user list csv, ... others?) +
+ +

Create (clone the template and create a new simulation record) Index: openacs-4/packages/simulation/www/siminst/simulation-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-edit.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/siminst/simulation-edit.tcl 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,7 @@ +ad_page_contract { + Create/edit a simulation +} + +set page_title "Create/edit simulation" +set context [list $page_title] +set package_id [ad_conn package_id] 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/simplay/index.adp 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,11 @@ + + @page_title;noquote@ + @context;noquote@ + +

+ To-do: show all active simulations (records in sim_simulation), +including number of cases (records in workflow_cases that are related +to a sim_simulation via the extension table sim_workflow_cases). + +List of currently active simulation cases: +

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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/simplay/index.tcl 13 Nov 2003 12:19:50 -0000 1.1 @@ -0,0 +1,7 @@ +ad_page_contract { + Simplay index page. +} + +set page_title "SimPlay" +set context [list $page_title] +set package_id [ad_conn package_id]