Index: openacs-4/contrib/packages/simulation/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/tcl/Attic/apm-callback-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/contrib/packages/simulation/tcl/apm-callback-procs.tcl 10 Nov 2003 16:56:56 -0000 1.7 +++ openacs-4/contrib/packages/simulation/tcl/apm-callback-procs.tcl 28 Nov 2003 16:55:52 -0000 1.8 @@ -19,7 +19,7 @@ ad_proc -private simulation::apm::after_instantiate { {-package_id:required} } { - Create the package root folder. + Create data associated with a simulation package instance. } { set instance_name [apm_instance_name_from_id $package_id] @@ -30,4 +30,20 @@ -package_id $package_id \ -context_id $package_id \ -content_types { sim_character sim_prop sim_location sim_stylesheet image }] + + application_group::new \ + -group_name "Simulation Test Class" \ + -package_id $package_id } + +ad_proc -private simulation::apm::before_uninstantiate { + {-package_id:required} +} { + Tear down data associated with a package instance. +} { + set folder_id [bcms::folder::get_id_by_package_id -parent_id 0] + bcms::folder::delete_folder -folder_id $folder_id + + set group_id [application_group::group_id_from_package_id -package_id $package_id] + group::delete $group_id +} Index: openacs-4/contrib/packages/simulation/tcl/object-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/tcl/Attic/object-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/simulation/tcl/object-procs.tcl 18 Nov 2003 13:31:32 -0000 1.5 +++ openacs-4/contrib/packages/simulation/tcl/object-procs.tcl 28 Nov 2003 16:55:52 -0000 1.6 @@ -9,6 +9,12 @@ namespace eval simulation::object {} namespace eval simulation::object::xml {} +############################### +# +# simulation::object namespace +# +############################### + ad_proc -private simulation::object::url { {-package_id ""} {-name:required} @@ -43,6 +49,12 @@ return "${package_url}object-content/${name}" } +############################### +# +# simulation::object::xml namespace +# +############################### + ad_proc -private simulation::object::xml::file_sweeper {} { Loop over all simulation package instances and re-generate XML map files for them. Index: openacs-4/contrib/packages/simulation/tcl/role-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/tcl/Attic/role-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/simulation/tcl/role-procs.tcl 18 Nov 2003 12:19:39 -0000 1.4 +++ openacs-4/contrib/packages/simulation/tcl/role-procs.tcl 28 Nov 2003 16:55:52 -0000 1.5 @@ -20,17 +20,39 @@ @author Peter Marklund } { db_transaction { - # create the role + set role_short_name [util_text_to_url -replacement "_" $role_short_name] set role_id [workflow::role::new \ -workflow_id $template_id \ -short_name $role_short_name \ -pretty_name $role_pretty_name] + db_dml insert_sim_role { + insert into sim_roles (role_id) values (:role_id) + } } } ad_proc -public simulation::role::delete { {-role_id:required} } { - workflow::role::delete -role_id $role_id + db_transaction { + workflow::role::delete -role_id $role_id + + db_dml delete_sim_role { + delete from sim_roles where role_id = :role_id + } + } } + +ad_proc -public simulation::role::edit { + {-role_id:required} + {-character_id:required} +} { + Edit a simulation role. +} { + db_dml edit_sim_role { + update sim_roles + set character_id = :character_id + where role_id = :role_id + } +} 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.12 -r1.13 --- openacs-4/contrib/packages/simulation/tcl/simulation-procs.tcl 14 Nov 2003 11:40:35 -0000 1.12 +++ openacs-4/contrib/packages/simulation/tcl/simulation-procs.tcl 28 Nov 2003 16:55:52 -0000 1.13 @@ -108,6 +108,124 @@ } } +ad_proc simulation::get_object_options { + {-content_type:required} +} { + Returns a list of cr_revision.title, cr_item.item_id pairs + for all cr_items of the given content_type in the root + folder of the current package. Suitable for ad_form options for + select boxes. + + @return [list [list cr_revision.title1 cr_item.item_id1] [list cr_revision.title2 cr_item.item_id2] ....] + + @author Peter Marklund +} { + set package_id [ad_conn package_id] + set parent_id [bcms::folder::get_id_by_package_id -package_id $package_id] + + return [db_list_of_lists character_options { + select cr.title, + ci.item_id + from cr_items ci, + cr_revisions cr + where ci.live_revision = cr.revision_id + and ci.parent_id = :parent_id + and ci.content_type = :content_type + }] +} + +ad_proc -public simulation::cast { + {-workflow_id:required} + {-pretty_name:required} + {-actors:required} + {-groupings:required} +} { + Takes a mapped simulation template and creates a casted simulation + with simulation cases. It does this by cloning the simulation + template. + + TODO: agent support + + TODO: taking actor type into account + + @param actors An array list with the actors of the simulation. The keys + of the list are role_ids and the values ids of the actor to play the role. + @param groups An array list with the groupings of the simulation. The keys + of the list are role_ids and the values are integers indicaing + a number of users to play that role. + + @return workflow_id of the simulation created. + + @author Peter Marklund +} { + array set actors_array $actors + array set groupings_array $groupings + + # TODO: make sure this is a proper clone also after mapping (tasks and characters...) + set workflow_id [simulation::template::clone \ + -pretty_name $pretty_name \ + -workflow_id $workflow_id] + + set user_list [db_list select_users { + select member_id + from party_approved_member_map + where party_id in (select + party_id from sim_party_sim_map + where simulation_id = :workflow_id + ) + }] + set total_n_users [llength $user_list] + + set n_users_per_case 0 + foreach role_id [array names groupings_array] { + set n_users_per_case [expr $n_users_per_case + $groupings_array($role_id)] + } + + set mod_n_users [expr $total_n_users % $n_users_per_case] + set n_cases [expr ($total_n_users - $mod_n_users) / $n_users_per_case] + + + if { $mod_n_users == "0" } { + # No rest in dividing, the cases add up nicely + + } else { + # We are missing mod_n_users to fill up the simulation. Create a new simulation + # for those students. + set n_cases [expr $n_cases + 1] + } + + # Create the cases and for each case assign roles to parties + set users_start_index 0 + for { set case_counter 0 } { $case_counter < $n_cases } { incr case_counter } { + # TODO: what should object_id be here? + set object_id [ad_conn package_id] + set case_id [workflow::case::new \ + -workflow_id $workflow_id \ + -object_id $object_id] + + # Assign a group of users to each role in the case + set party_array_list [list] + foreach role_id [array names actors] { + set role_short_name [workflow::role::get_element -role_id $role_id -element short_name] + + set users_end_index [expr $users_start_index + $groupings_array($role_id) - 1] + + set parties_list [lrange $user_list $users_start_index $users_end_index] + + lappend parties_array_list $role_short_name $users_list + + set users_start_index [expr $users_end_index + 1] + } + + workflow::case::role::assign \ + -case_id $case_id \ + -array $party_array_list \ + -replace + } + + return $workflow_id +} + template_tag relation { params } { publish::process_tag relation $params } Index: openacs-4/contrib/packages/simulation/tcl/template-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/tcl/Attic/template-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/simulation/tcl/template-procs.tcl 28 Nov 2003 11:12:39 -0000 1.4 +++ openacs-4/contrib/packages/simulation/tcl/template-procs.tcl 28 Nov 2003 16:55:52 -0000 1.5 @@ -26,6 +26,8 @@ set ready_p "f" } db_transaction { + set short_name [util_text_to_url -replacement "_" $short_name] + set workflow_id [workflow::new \ -short_name $short_name \ -pretty_name $pretty_name \ @@ -42,24 +44,40 @@ -short_name "dummy action" \ -pretty_name "dummy action" - set suggested_duration [string trim $suggested_duration] - if { [empty_string_p $suggested_duration] } { - db_dml new_sim { - insert into sim_simulations - (simulation_id, ready_p) - values (:workflow_id, :ready_p) - } - } else { - db_dml new_sim " - insert into sim_simulations - (simulation_id, ready_p, suggested_duration) - values ('$workflow_id', '$ready_p', interval '$suggested_duration')" - } + insert_sim \ + -workflow_id $workflow_id \ + -ready_p $ready_p \ + -suggested_duration $suggested_duration } return $workflow_id } +ad_proc -private simulation::template::insert_sim { + {-workflow_id:required} + {-ready_p:required} + {-suggested_duration:required} +} { + Internal proc for inserting values into the sim_simulations + table that are set prior to a template being mapped. + + @author Peter Marklund +} { + set suggested_duration [string trim $suggested_duration] + if { [empty_string_p $suggested_duration] } { + db_dml new_sim { + insert into sim_simulations + (simulation_id, ready_p) + values (:workflow_id, :ready_p) + } + } else { + db_dml new_sim " + insert into sim_simulations + (simulation_id, ready_p, suggested_duration) + values ('$workflow_id', '$ready_p', interval '$suggested_duration')" + } +} + ad_proc -public simulation::template::edit { {-workflow_id:required} {-short_name:required} @@ -106,6 +124,98 @@ } } +ad_proc -public simulation::template::instantiate_edit { + {-workflow_id:required} + {-enroll_start:required} + {-enroll_end:required} + {-notification_date:required} + {-case_start:required} + {-case_end:required} + {-enroll_type:required} + {-casting_type:required} + {-parties:required} +} { + Edit properties of a simulation set during instantiation. + + TODO: merge this proc with ::edit? + + @author Peter Marklund +} { + db_dml update_instantiate_template { + update sim_simulations + set enroll_start = to_date(:enroll_start, 'YYYY-MM-DD'), + enroll_end = to_date(:enroll_end, 'YYYY-MM-DD'), + send_start_note_date = to_date(:notification_date, 'YYYY-MM-DD'), + case_start = to_date(:case_start, 'YYYY-MM-DD'), + case_end = to_date(:case_end, 'YYYY-MM-DD'), + enroll_type = :enroll_type, + casting_type = :casting_type + where simulation_id = :workflow_id + } + + # Clear out old mappings first + db_dml clear_old_mappings { + delete from sim_party_sim_map + where simulation_id = :workflow_id + } + + foreach party_id $parties { + db_dml map_party_to_template { + insert into sim_party_sim_map + (simulation_id, party_id) + values (:workflow_id, :party_id) + } + } +} +ad_proc -public simulation::template::clone { + {-workflow_id:required} + {-pretty_name:required} +} { + Create a new simulation template which is a clone of the template with + given id. The clone will be mapped to the package of the current request. + + @param workflow_id The id of the template that you wish to clone. + @param pretty_name The pretty name of the clone you are creating. + + @return The id of the clone. + + @author Peter Marklund +} { + # If we set object_id here and leave short_name unchanged we + # get a unique constraint violation + set clone_workflow_id [workflow::fsm::clone \ + -workflow_id $workflow_id] + + # Set names of clones workflow and update the object_id + # TODO: create workflow::edit proc + set clone_short_name [util_text_to_url -replacement "_" $pretty_name] + set object_id [ad_conn package_id] + db_dml update_short_name { + update workflows + set short_name = :clone_short_name, + pretty_name = :pretty_name, + object_id = :object_id + where workflow_id = :clone_workflow_id + } + + # Add the role_id:s to the sim_roles table + set role_id_list [workflow::get_roles -workflow_id $clone_workflow_id] + foreach role_id $role_id_list { + db_dml insert_sim_role { + insert into sim_roles (role_id) values (:role_id) + } + } + + # Clone the values in the simulation table + get -workflow_id $workflow_id -array workflow + insert_sim \ + -workflow_id $clone_workflow_id \ + -ready_p $workflow(ready_p) \ + -suggested_duration $workflow(suggested_duration) + + return $clone_workflow_id +} + ad_proc -public simulation::template::get { {-workflow_id:required} {-array:required} Index: openacs-4/contrib/packages/simulation/test/crawl-links.test =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/test/Attic/crawl-links.test,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/simulation/test/crawl-links.test 19 Nov 2003 10:05:07 -0000 1.2 +++ openacs-4/contrib/packages/simulation/test/crawl-links.test 28 Nov 2003 16:55:52 -0000 1.3 @@ -9,7 +9,7 @@ ::twt::log_section "Login the site wide admin" ::twt::user::login_site_wide_admin - ::twt::set_crawler_exclude_links {delete} + ::twt::set_crawler_exclude_links {delete remove} # NOTE: The crawler needs the trailing slash when first invoked set simulation_uri /simulation/ Index: openacs-4/contrib/packages/simulation/test/demo-data-setup.test =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/test/Attic/demo-data-setup.test,v diff -u -r1.6 -r1.7 --- openacs-4/contrib/packages/simulation/test/demo-data-setup.test 19 Nov 2003 07:40:46 -0000 1.6 +++ openacs-4/contrib/packages/simulation/test/demo-data-setup.test 28 Nov 2003 16:55:52 -0000 1.7 @@ -75,6 +75,8 @@ do_request /simulation/simbuild/template-edit set template_name "Elementary Private Law" field fill $template_name ~n name + field find ~n ready_p + field fill t form submit ::twt::log_section "Create roles for template" Index: openacs-4/contrib/packages/simulation/www/doc/admin.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/admin.html,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/simulation/www/doc/admin.html 14 Nov 2003 14:03:11 -0000 1.2 +++ openacs-4/contrib/packages/simulation/www/doc/admin.html 28 Nov 2003 16:55:52 -0000 1.3 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Admin Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="package-install.html" title="Package installation"><link rel="next" href="map_xml.html" title="Map XML"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="package-install.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="map_xml.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="admin"></a>Admin Guide</h2></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="map_xml.html">Map XML</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="package-install.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="map_xml.html">Next</a></td></tr><tr><td width="40%" align="left">Package installation </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Map XML</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/admin.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Admin Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="package-install.html" title="Package installation"><link rel="next" href="map_xml.html" title="Map XML"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="package-install.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="map_xml.html">Next</a></td></tr></table><hr></div><div class="article"><div class="titlepage"><div><h2 class="title"><a name="admin"></a>Admin Guide</h2></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="map_xml.html">Map XML</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="package-install.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="map_xml.html">Next</a></td></tr><tr><td width="40%" align="left">Package installation </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Map XML</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/admin.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/contrib/packages/simulation/www/doc/design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/design.html,v diff -u -r1.6 -r1.7 --- openacs-4/contrib/packages/simulation/www/doc/design.html 14 Nov 2003 14:03:11 -0000 1.6 +++ openacs-4/contrib/packages/simulation/www/doc/design.html 28 Nov 2003 16:55:52 -0000 1.7 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="map_xml.html" title="Map XML"><link rel="next" href="interfaces.html" title="Interfaces"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="map_xml.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="interfaces.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="design"></a>Design</h2></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="interfaces.html">Interfaces</a></span></dt><dt><span class="sect1"><a href="internals.html">Internal Design</a></span></dt><dt><span class="sect1"><a href="permissions.html">Permissions</a></span></dt><dt><span class="sect1"><a href="object-orientation-notes.html">Notes on an object-oriented simulated space</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="map_xml.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="interfaces.html">Next</a></td></tr><tr><td width="40%" align="left">Map XML </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Interfaces</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/design.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="map_xml.html" title="Map XML"><link rel="next" href="interfaces.html" title="Interfaces"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="map_xml.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="interfaces.html">Next</a></td></tr></table><hr></div><div class="article"><div class="titlepage"><div><h2 class="title"><a name="design"></a>Design</h2></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="interfaces.html">Interfaces</a></dt><dt><a href="internals.html">Internal Design</a></dt><dt><a href="permissions.html">Permissions</a></dt><dt><a href="object-orientation-notes.html">Notes on an object-oriented simulated space</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="map_xml.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="interfaces.html">Next</a></td></tr><tr><td width="40%" align="left">Map XML </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Interfaces</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/design.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/contrib/packages/simulation/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/index.html,v diff -u -r1.8 -r1.9 --- openacs-4/contrib/packages/simulation/www/doc/index.html 26 Nov 2003 16:44:50 -0000 1.8 +++ openacs-4/contrib/packages/simulation/www/doc/index.html 28 Nov 2003 16:55:52 -0000 1.9 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Simulation</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="next" href="install.html" title="Installation"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr></table><hr></div><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2762182"></a>Simulation</h1></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="install.html">Installation</a></span></dt><dd><dl><dt><span class="sect1"><a href="package-install.html">Package installation</a></span></dt></dl></dd><dt><span class="article"><a href="admin.html">Admin Guide</a></span></dt><dd><dl><dt><span class="sect1"><a href="map_xml.html">Map XML</a></span></dt></dl></dd><dt><span class="article"><a href="design.html">Design</a></span></dt><dd><dl><dt><span class="sect1"><a href="interfaces.html">Interfaces</a></span></dt><dt><span class="sect1"><a href="internals.html">Internal Design</a></span></dt><dt><span class="sect1"><a href="permissions.html">Permissions</a></span></dt><dt><span class="sect1"><a href="object-orientation-notes.html">Notes on an object-oriented simulated space</a></span></dt></dl></dd><dt><span class="appendix"><a href="licensing.html">A. Licencing</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> Installation</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/index.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Simulation</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="next" href="install.html" title="Installation"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><div><h1 class="title"><a name="id2768914"></a>Simulation</h1></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="install.html">Installation</a></dt><dd><dl><dt><a href="package-install.html">Package installation</a></dt></dl></dd><dt><a href="admin.html">Admin Guide</a></dt><dd><dl><dt><a href="map_xml.html">Map XML</a></dt></dl></dd><dt><a href="design.html">Design</a></dt><dd><dl><dt><a href="interfaces.html">Interfaces</a></dt><dt><a href="internals.html">Internal Design</a></dt><dt><a href="permissions.html">Permissions</a></dt><dt><a href="object-orientation-notes.html">Notes on an object-oriented simulated space</a></dt></dl></dd><dt>A. <a href="licensing.html">Licencing</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> Installation</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/index.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/contrib/packages/simulation/www/doc/install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/install.html,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/simulation/www/doc/install.html 14 Nov 2003 14:03:11 -0000 1.4 +++ openacs-4/contrib/packages/simulation/www/doc/install.html 28 Nov 2003 16:55:52 -0000 1.5 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="index.html" title="Simulation"><link rel="next" href="package-install.html" title="Package installation"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="package-install.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="install"></a>Installation</h2></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="package-install.html">Package installation</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="package-install.html">Next</a></td></tr><tr><td width="40%" align="left">Simulation </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Package installation</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/install.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="index.html" title="Simulation"><link rel="next" href="package-install.html" title="Package installation"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="package-install.html">Next</a></td></tr></table><hr></div><div class="article"><div class="titlepage"><div><h2 class="title"><a name="install"></a>Installation</h2></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="package-install.html">Package installation</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="package-install.html">Next</a></td></tr><tr><td width="40%" align="left">Simulation </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Package installation</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/install.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/contrib/packages/simulation/www/doc/interfaces.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/interfaces.html,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/simulation/www/doc/interfaces.html 14 Nov 2003 11:30:37 -0000 1.2 +++ openacs-4/contrib/packages/simulation/www/doc/interfaces.html 28 Nov 2003 16:55:52 -0000 1.3 @@ -1,2 +1,3 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Interfaces</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="design.html" title="Design"><link rel="next" href="internals.html" title="Internal Design"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="design.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="interfaces"></a>Interfaces</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="page-map"></a>Page Map</h3></div></div><div></div></div><div class="mediaobject"><img src="page-map.png"></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="tcl-api"></a>TCL API</h3></div></div><div></div></div><p><a href="/api-doc/proc-search?query_string=simulation%3A%3A&search_type=All+matches" target="_top">TCL API</a></p><p>Each TCL API item should include inputs, outputs, and a - comment block describing any non-obvious internal issues.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sql-api"></a>SQL API</h3></div></div><div></div></div><p>None yet.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="design.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr><tr><td width="40%" align="left">Design </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Internal Design</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/interfaces.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Interfaces</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="design.html" title="Design"><link rel="next" href="internals.html" title="Internal Design"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="design.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="interfaces"></a>Interfaces</h2></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="page-map"></a>Page Map</h3></div></div><div class="mediaobject"><img src="page-map.png"></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="tcl-api"></a>TCL API</h3></div></div><p><a href="/api-doc/proc-search?query_string=simulation%3A%3A&search_type=All%2Bmatches" target="_top">TCL API</a></p><p>Each TCL API item should include inputs, outputs, and a + comment block describing any non-obvious internal issues.</p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="sql-api"></a>SQL API</h3></div></div><p>None yet.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="design.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr><tr><td width="40%" align="left">Design </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Internal Design</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/interfaces.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/contrib/packages/simulation/www/doc/internals.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/internals.html,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/simulation/www/doc/internals.html 14 Nov 2003 14:03:11 -0000 1.3 +++ openacs-4/contrib/packages/simulation/www/doc/internals.html 28 Nov 2003 16:55:52 -0000 1.4 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Internal Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="interfaces.html" title="Interfaces"><link rel="next" href="permissions.html" title="Permissions"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="interfaces.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="permissions.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="internals"></a>Internal Design</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="data-model"></a>Data Model</h3></div></div><div></div></div><div class="mediaobject"><img src="data-model.png"></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="interfaces.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="permissions.html">Next</a></td></tr><tr><td width="40%" align="left">Interfaces </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Permissions</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/internals.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Internal Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="interfaces.html" title="Interfaces"><link rel="next" href="permissions.html" title="Permissions"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="interfaces.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="permissions.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="internals"></a>Internal Design</h2></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="data-model"></a>Data Model</h3></div></div><div class="mediaobject"><img src="data-model.png"></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="interfaces.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="permissions.html">Next</a></td></tr><tr><td width="40%" align="left">Interfaces </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Permissions</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/internals.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/contrib/packages/simulation/www/doc/licensing.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/licensing.html,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/doc/licensing.html 14 Nov 2003 14:03:11 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/doc/licensing.html 28 Nov 2003 16:55:52 -0000 1.2 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Appendix�A.�Licencing</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="object-orientation-notes.html" title="Notes on an object-oriented simulated space"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="object-orientation-notes.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> </td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="licensing"></a>Appendix�A.�Licencing</h2></div></div><div></div></div><p>TODO</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="object-orientation-notes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left">Notes on an object-oriented simulated space </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> </td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/licensing.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Appendix A. Licencing</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="object-orientation-notes.html" title="Notes on an object-oriented simulated space"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="object-orientation-notes.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> </td></tr></table><hr></div><div class="appendix"><div class="titlepage"><div><h2 class="title"><a name="licensing"></a>Appendix A. Licencing</h2></div></div><p>TODO</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="object-orientation-notes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left">Notes on an object-oriented simulated space </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> </td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/licensing.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/contrib/packages/simulation/www/doc/map_xml.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/map_xml.html,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/doc/map_xml.html 12 Nov 2003 11:17:28 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/doc/map_xml.html 28 Nov 2003 16:55:52 -0000 1.2 @@ -1,4 +1,5 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Map XML</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="admin.html" title="Admin Guide"><link rel="previous" href="admin.html" title="Admin Guide"><link rel="next" href="design.html" title="Design"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="admin.html">Prev</a> </td><th width="60%" align="center">Admin Guide</th><td width="20%" align="right"> <a accesskey="n" href="design.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="map_xml"></a>Map XML</h2></div></div><div></div></div><p> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Map XML</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="admin.html" title="Admin Guide"><link rel="previous" href="admin.html" title="Admin Guide"><link rel="next" href="design.html" title="Design"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="admin.html">Prev</a> </td><th width="60%" align="center">Admin Guide</th><td width="20%" align="right"> <a accesskey="n" href="design.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="map_xml"></a>Map XML</h2></div></div><p> The simulation package will nightly generate an XML file with information needed for the SIMBUILD flash map. The objects in the XML file will be those that are supposed to appear on the map, i.e. those that have the on_map_p attribute set to true. The file Index: openacs-4/contrib/packages/simulation/www/doc/object-orientation-notes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/object-orientation-notes.html,v diff -u -r1.8 -r1.9 --- openacs-4/contrib/packages/simulation/www/doc/object-orientation-notes.html 26 Nov 2003 16:44:50 -0000 1.8 +++ openacs-4/contrib/packages/simulation/www/doc/object-orientation-notes.html 28 Nov 2003 16:55:52 -0000 1.9 @@ -1,4 +1,5 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Notes on an object-oriented simulated space</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="permissions.html" title="Permissions"><link rel="next" href="licensing.html" title="Appendix�A.�Licencing"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="permissions.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="licensing.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="object-orientation-notes"></a>Notes on an object-oriented simulated space</h2></div></div><div></div></div><p>An OpenACS simulation is a collection of interactive +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Notes on an object-oriented simulated space</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="permissions.html" title="Permissions"><link rel="next" href="licensing.html" title="Appendix A. Licencing"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="permissions.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="licensing.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="object-orientation-notes"></a>Notes on an object-oriented simulated space</h2></div></div><p>An OpenACS simulation is a collection of interactive objects, plus a set of roles and tasks. In the first part, it is conceptually similar to a MOO (Multiple-User Dungeon, Object-Oriented). This is a technology dating to 1990, in which @@ -10,7 +11,7 @@ Games), which are essentially MOOs with graphical instead of textual interfaces. Given their lineage and success, it makes sense to draw on MOO technology when designing our simulation - object model.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="verbs"></a>Objects</h3></div></div><div></div></div><p>Basic MOO objects</p><pre class="programlisting"> + object model.</p><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="verbs"></a>Objects</h3></div></div><p>Basic MOO objects</p><pre class="programlisting"> Root Class Room Thing @@ -27,13 +28,13 @@ Exit Container Openable Container -</pre><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2824733"></a>Object Attributes</h4></div></div><div></div></div><p>(From the LambdaMOO Programmer's Manual</p><pre class="programlisting"> +</pre><div class="sect3"><div class="titlepage"><div><h4 class="title"><a name="id2767803"></a>Object Attributes</h4></div></div><p>(From the LambdaMOO Programmer's Manual</p><pre class="programlisting"> There are three fundamental attributes to every object: 1. A flag (either true or false) specifying whether or not the object represents a player, 2. The object that is its parent, and 3. A list of the objects that are its children; that is, those - objects for which this object is their parent. </pre><p>"Every object has eight built-in properties whose values are constrained to be of particular types. "</p><pre class="programlisting"> + objects for which this object is their parent. </pre><p>"Every object has eight built-in properties whose values are constrained to be of particular types. "</p><pre class="programlisting"> name a string, the usual name for this object owner an object, the player who controls access to it location an object, where the object is in virtual reality @@ -43,4 +44,4 @@ r a bit, is the object publicly readable? w a bit, is the object publicly writable? f a bit, is the object fertile? -</pre></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="verbs"></a>Verbs</h3></div></div><div></div></div><p>Minimal MOO verbs:</p><div class="itemizedlist"><ul type="disc"><li><p>put</p><p>take</p><p>get</p><p>drop</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="permissions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="licensing.html">Next</a></td></tr><tr><td width="40%" align="left">Permissions </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Appendix�A.�Licencing</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/object-orientation-notes.html#comments">View comments on this page at openacs.org</a></center></body></html> +</pre></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="verbs"></a>Verbs</h3></div></div><p>Minimal MOO verbs:</p><div class="itemizedlist"><ul type="disc"><li><p>put</p><p>take</p><p>get</p><p>drop</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="permissions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="licensing.html">Next</a></td></tr><tr><td width="40%" align="left">Permissions </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Appendix A. Licencing</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/object-orientation-notes.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/contrib/packages/simulation/www/doc/package-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/package-install.html,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/doc/package-install.html 14 Nov 2003 14:03:11 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/doc/package-install.html 28 Nov 2003 16:55:52 -0000 1.2 @@ -1,4 +1,5 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Package installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="install.html" title="Installation"><link rel="previous" href="install.html" title="Installation"><link rel="next" href="admin.html" title="Admin Guide"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="install.html">Prev</a> </td><th width="60%" align="center">Installation</th><td width="20%" align="right"> <a accesskey="n" href="admin.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="package-install"></a>Package installation</h2></div></div><div></div></div><p>Requires workflow and bcms and their prerequisites.</p><div class="itemizedlist"><ul type="disc"><li><p> Option 1: use a custom tarball which includes those modules. In +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Package installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="install.html" title="Installation"><link rel="previous" href="install.html" title="Installation"><link rel="next" href="admin.html" title="Admin Guide"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="install.html">Prev</a> </td><th width="60%" align="center">Installation</th><td width="20%" align="right"> <a accesskey="n" href="admin.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="package-install"></a>Package installation</h2></div></div><p>Requires workflow and bcms and their prerequisites.</p><div class="itemizedlist"><ul type="disc"><li><p> Option 1: use a custom tarball which includes those modules. In that case, the custom tarball will have a file install.xml in its root directory, so that installing OpenACS normally will produce a simulation server. </p><p>Notes on custom tarball creation:</p><pre class="programlisting"> Index: openacs-4/contrib/packages/simulation/www/doc/permissions.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/Attic/permissions.html,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/simulation/www/doc/permissions.html 26 Nov 2003 16:44:50 -0000 1.2 +++ openacs-4/contrib/packages/simulation/www/doc/permissions.html 28 Nov 2003 16:55:52 -0000 1.3 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Permissions</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="internals.html" title="Internal Design"><link rel="next" href="object-orientation-notes.html" title="Notes on an object-oriented simulated space"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="object-orientation-notes.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="permissions"></a>Permissions</h2></div></div><div></div></div><p><a href="permissions-table" target="_top">Permissions Table</a> (<a href="permissions-table.sxc" target="_top">OO spreadsheet</a>)</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="object-orientation-notes.html">Next</a></td></tr><tr><td width="40%" align="left">Internal Design </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Notes on an object-oriented simulated space</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/permissions.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Permissions</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="internals.html" title="Internal Design"><link rel="next" href="object-orientation-notes.html" title="Notes on an object-oriented simulated space"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="object-orientation-notes.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="permissions"></a>Permissions</h2></div></div><p><a href="permissions-table" target="_top">Permissions Table</a> (<a href="permissions-table.sxc" target="_top">OO spreadsheet</a>)</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="object-orientation-notes.html">Next</a></td></tr><tr><td width="40%" align="left">Internal Design </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Notes on an object-oriented simulated space</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/permissions.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/contrib/packages/simulation/www/doc/xml/Makefile =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/doc/xml/Attic/Makefile,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/simulation/www/doc/xml/Makefile 26 Nov 2003 16:44:50 -0000 1.4 +++ openacs-4/contrib/packages/simulation/www/doc/xml/Makefile 28 Nov 2003 16:55:52 -0000 1.5 @@ -18,4 +18,4 @@ all: - cd .. ; $(XSLTPROC) --nonet --novalid --xinclude ../../../../packages/acs-core-docs/www/xml/openacs.xsl xml/index.xml \ No newline at end of file + cd .. ; $(XSLTPROC) --nonet --novalid --xinclude ../../../acs-core-docs/www/xml/openacs.xsl xml/index.xml \ No newline at end of file Index: openacs-4/contrib/packages/simulation/www/siminst/cast-actors.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/cast-actors.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/siminst/cast-actors.adp 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/siminst/cast-actors.adp 28 Nov 2003 16:55:52 -0000 1.2 @@ -2,17 +2,17 @@ <property name="title">@page_title;noquote@</property> <property name="context">@context;noquote@</property> +<formtemplate id="actors"></formtemplate> + +<p> +TODO: get desired layout, see below: +</p> + <center> (this is just a mockup) <table width="60%"> -<tr><th>Role</th><th>Character</th><th>Actor(s)</th><th>In groups of</th></tr> -<tr><td>Plaintiff</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> +<tr><th>Role</th><th>Actor(s)</th><th>In groups of</th></tr> +<tr><td>Plaintiff</td> <td><select> <option>Automatic Agent</option> <option>Student</option> @@ -24,13 +24,7 @@ </select> </td> </tr> -<tr><td>Defendent</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> +<tr><td>Defendent</td> <td><select> <option>Automatic Agent</option> <option>Student</option> @@ -41,13 +35,7 @@ <td><input type="text" size="2" value="1"></input> </td> </tr> -<tr><td>Judge</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> +<tr><td>Judge</td> <td><select> <option>Student</option> <option>TA</option> Index: openacs-4/contrib/packages/simulation/www/siminst/cast-actors.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/cast-actors.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/siminst/cast-actors.tcl 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/siminst/cast-actors.tcl 28 Nov 2003 16:55:52 -0000 1.2 @@ -10,3 +10,45 @@ set page_title "Choose actors" set context [list [list "." "SimInst"] $page_title] + +# Loop over all workflow roles and append the actor and "in groups of" widgets to the form +set form { + {pretty_name:text + {label "Simulation name"} + {html {size 50}} + } +} + +foreach role_id [workflow::get_roles -workflow_id $workflow_id] { + set role_pretty_name [workflow::role::get_element -role_id $role_id -element pretty_name] + lappend form [list actor_${role_id}:text(select) \ + [list label $role_pretty_name] \ + [list options {{Student student} {Professor professor}}] + ] + lappend form [list group_${role_id}:integer [list label "In groups of"] [list value 1]] +} + +ad_form \ + -name actors \ + -export { workflow_id } \ + -form $form \ + -on_submit { + + # Put the actor and grouping selections on array list formats + set actors_list [list] + set groups_list [list] + foreach role_id [workflow::get_roles -workflow_id $workflow_id] { + lappend actors_list $role_id [set actor_$role_id] + lappend groups_list $role_id [set group_$role_id] + } + + simulation::cast \ + -workflow_id $workflow_id \ + -pretty_name $pretty_name \ + -actors $actors_list \ + -groups $groups_list + + # Proceed to the instantiation complete page + ad_returnredirect [export_vars -base cast-complete {workflow_id}] + ad_script_abort + } \ No newline at end of file Index: openacs-4/contrib/packages/simulation/www/siminst/cast-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/cast-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/siminst/cast-edit.tcl 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/siminst/cast-edit.tcl 28 Nov 2003 16:55:52 -0000 1.2 @@ -5,37 +5,79 @@ } set page_title "Create/edit simulation" -set context [list $page_title] +set context [list [list "." "SimInst"] $page_title] set package_id [ad_conn package_id] +# TODO: only one aplication group per package - need different solution +set group_id [application_group::group_id_from_package_id -package_id $package_id] +set group_name [group::get_element -group_id $group_id -element group_name] +set group_options [list [list $group_name $group_id]] + +# TODO: Possible future casting_type options: +# choose_role +# choose_role_and_instance + +# TODO: provide more sensible default dates? +# Notification send could be start date minus some parameter +set in_a_month_date [clock format [expr [clock seconds] + 3600*24*31] -format "%Y %m %d"] +set in_two_months_date [clock format [expr [clock seconds] + 2*3600*24*31] -format "%Y %m %d"] +set in_two_and_a_half_months_date [clock format [expr [clock seconds] + 3*3600*24*31 - 3600*24*15] -format "%Y %m %d"] +set in_three_months_date [clock format [expr [clock seconds] + 3*3600*24*31] -format "%Y %m %d"] +set in_four_months_date [clock format [expr [clock seconds] + 4*3600*24*31] -format "%Y %m %d"] ad_form -export { workflow_id } -name simulation \ -form { - {enroll_start + {enroll_start:date,optional {label "Enrollment start date"} + {value $in_a_month_date} } - {enroll_end + {enroll_end:date,optional {label "Enrollment end date"} + {value $in_two_months_date} } - {notification_date + {notification_date:date {label "Date to send start notification"} + {value $in_two_and_a_half_months_date} } - {case_start + {case_start:date {label "Simulation start date"} + {value $in_three_months_date} } - {case_end + {case_end:date {label "Simulation end date"} + {value $in_four_months_date} } - {enroll_type - {label "Open Enrollment?"} + {enroll_type:text(radio) + {label "Enrollment type"} + {options {{Closed closed}}} + {value closed} } - {casting_type - {label "Open casting?"} + {casting_type:text(radio) + {label "Casting type"} + {options {{Automatic automatic}}} + {value automatic} } - {tools - {label "tools for enrollment and casting. (upload of user list csv, ... others?) TODO..."} + {user_group:integer(select) + {label "User Group"} + {options $group_options} } } -on_submit { - # TODO (clone the template and create a new simulation record) - ad_returnredirect simulation-casting + # Convert dates to ANSI format + foreach var_name {enroll_start enroll_end notification_date case_start case_end} { + set ${var_name}_ansi "[lindex [set $var_name] 0]-[lindex [set $var_name] 1]-[lindex [set $var_name] 2]" + } + + simulation::template::instantiate_edit \ + -workflow_id $workflow_id \ + -enroll_start $enroll_start_ansi \ + -enroll_end $enroll_end_ansi \ + -notification_date $notification_date_ansi \ + -case_start $case_start_ansi \ + -case_end $case_end_ansi \ + -enroll_type $enroll_type \ + -casting_type $casting_type \ + -parties $user_group + + # Proceed to choosing actors + ad_returnredirect [export_vars -base cast-actors { workflow_id }] ad_script_abort } 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 -r1.6 -r1.7 --- openacs-4/contrib/packages/simulation/www/siminst/index.adp 27 Nov 2003 16:43:36 -0000 1.6 +++ openacs-4/contrib/packages/simulation/www/siminst/index.adp 28 Nov 2003 16:55:52 -0000 1.7 @@ -5,12 +5,14 @@ <h2>Templates Ready for Mapping</h2> <p> - <listtemplate name="avail_templates"></listtemplate> + <listtemplate name="ready_templates"></listtemplate> </p> <h2>Mapped Templates</h2> -TODO... +<p> + <listtemplate name="mapped_templates"></listtemplate> +</p> <h2>Current Simulations</h2> <p> @@ -20,7 +22,7 @@ <h2>Help</h2> <p> - The process of creating a simulation form a simulation template is referred to as instantiation. The + The process of creating a simulation form a simulation template is referred to as <b>instantiation</b>. The instantiation process is divided into two steps: <ol> 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 -r1.3 -r1.4 --- openacs-4/contrib/packages/simulation/www/siminst/index.tcl 27 Nov 2003 16:43:36 -0000 1.3 +++ openacs-4/contrib/packages/simulation/www/siminst/index.tcl 28 Nov 2003 16:55:52 -0000 1.4 @@ -6,65 +6,112 @@ set context [list $page_title] set package_id [ad_conn package_id] -###################################################################### -# -# avail_templates -# -# A list of templates that can be instantiated -# -###################################################################### - #--------------------------------------------------------------------- -# avail_templates list +# Templates ready for mapping #--------------------------------------------------------------------- -set elements { - pretty_name { - label "Template" - orderby upper(w.pretty_name) - } - suggested_duration { - label "Suggested Duration" - orderby suggested_duration - } - number_of_roles { - label "Roles" - orderby number_of_roles - } - min_number_of_human_roles { - label "Min \# of players" - orderby min_number_of_human_roles - } - instantiate { - link_url_col inst_url - display_template { - Start mapping process +# TODO: new columns: +# number_of_roles +# number_of_roles_not_cast +# number_of_tasks +# number_of_tasks_undescribed +# number_of_prop_slots +# number_of_prop_unfilled +# TODO: +# only show casting link if all the mapping parts are complete +template::list::create \ + -name ready_templates \ + -multirow ready_templates \ + -no_data "No templates are ready for mapping" \ + -elements { + pretty_name { + label "Template" + orderby upper(w.pretty_name) } + suggested_duration { + label "Suggested Duration" + orderby suggested_duration + } + number_of_roles { + label "Roles" + orderby number_of_roles + } + min_number_of_human_roles { + label "Min \# of players" + orderby min_number_of_human_roles + } + map { + link_url_col map_url + display_template { + Begin mapping + } + } } -} -template::list::create \ - -name avail_templates \ - -multirow avail_templates \ - -no_data "No simulation templates available for instantiation." \ - -elements $elements - -#--------------------------------------------------------------------- -# avail_templates multirow -#--------------------------------------------------------------------- - -# TODO: number_of_roles, min_number_of_human_roles -db_multirow -extend {inst_url} avail_templates select_avail_templates " +# TODO: min_number_of_human_roles should take agents into account +db_multirow -extend {map_url} ready_templates select_ready_templates { select workflow_id, suggested_duration, pretty_name, - (select 1) as number_of_roles, - (select 1) as min_number_of_human_roles + (select count(*) + from workflow_roles + where workflow_id = w.workflow_id) as number_of_roles, + (select count(*) + from workflow_roles + where workflow_id = w.workflow_id) as min_number_of_human_roles from sim_simulations ss, workflows w where ss.simulation_id = w.workflow_id and w.object_id = :package_id and ready_p = 't' -" { - set inst_url [export_vars -base "map-characters" { workflow_id }] +} { + set map_url [export_vars -base "map-create" { workflow_id }] + + if { [empty_string_p $suggested_duration] } { + set suggested_duration "none specified" + } } + +#--------------------------------------------------------------------- +# Mapped templates +#--------------------------------------------------------------------- + +template::list::create \ + -name mapped_templates \ + -multirow mapped_templates \ + -no_data "No templates have been mapped" \ + -elements { + pretty_name { + label "Template" + orderby upper(w.pretty_name) + } + cast { + link_url_col cast_url + display_template { + Begin casting + } + } + } + +# TODO: update the mapped_p subquery for agents +# Simpler solution: +# type column with possible values: +# incomplete_template +# ready_template +# mapped_template +# simulation +# and not exists (select 1 +# from sim_roles sr, +# workflow_roles wr +# where sr.role_id = wr.role_id +# and sr.character_id is null +# and wr.workflow_id = w.workflow_id +# ) +db_multirow -extend { cast_url } mapped_templates select_mapped_templates { + select w.workflow_id, + w.pretty_name + from workflows w + where w.object_id = :package_id +} { + set cast_url [export_vars -base "cast-edit" { workflow_id }] +} Index: openacs-4/contrib/packages/simulation/www/siminst/map-characters.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-characters.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/siminst/map-characters.adp 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/siminst/map-characters.adp 28 Nov 2003 16:55:52 -0000 1.2 @@ -2,64 +2,45 @@ <property name="title">@page_title;noquote@</property> <property name="context">@context;noquote@</property> -<center> -(this is just a mockup) -<table width="60%"> -<tr><th>Role</th><th>Character</th><th>Actor(s)</th><th>In groups of</th></tr> -<tr><td>Plaintiff</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> -<td><select> - <option>Automatic Agent</option> - <option>Student</option> - <option>TA</option> - <option>Professor</option> -</select> -</td> -<td><input type="text" size="2" value="1"></input> -</select> -</td> -</tr> -<tr><td>Defendent</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> -<td><select> - <option>Automatic Agent</option> - <option>Student</option> - <option>TA</option> - <option>Professor</option> -</select> -</td> -<td><input type="text" size="2" value="1"></input> -</td> -</tr> -<tr><td>Judge</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> -<td><select> - <option>Student</option> - <option>TA</option> - <option>Professor</option> -</select> -</td> -<td><input type="text" size="2" value="1"></input> -</td> -</tr> -</table> -</center> +<formtemplate id="characters"></formtemplate> + <p> - <a href="map-tasks?workflow_id=@workflow_id@">Map to tasks</a> +TODO: get desired layout, see below: </p> + +<center> + (this is just a mockup) + <table width="60%"> + <tr> + <th>Role</th> + <th>Character</th> + </tr> + <tr> + <td>Plaintiff</td> + <td> + <select> + <option>Bob</option> + <option>Jianing (Lawfirm X)</option> + <option>Larry (Lawfirm Y)</option> + </select> + </td> + </tr> + <tr><td>Defendent</td><td> + <select> + <option>Bob</option> + <option>Jianing (Lawfirm X)</option> + <option>Larry (Lawfirm Y)</option> + </select> + </td> + </tr> + <tr><td>Judge</td><td> + <select> + <option>Bob</option> + <option>Jianing (Lawfirm X)</option> + <option>Larry (Lawfirm Y)</option> + </select> + </td> + </tr> + </table> +</center> Index: openacs-4/contrib/packages/simulation/www/siminst/map-characters.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-characters.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/simulation/www/siminst/map-characters.tcl 28 Nov 2003 09:32:26 -0000 1.2 +++ openacs-4/contrib/packages/simulation/www/siminst/map-characters.tcl 28 Nov 2003 16:55:52 -0000 1.3 @@ -12,13 +12,35 @@ set context [list [list "." "SimInst"] $page_title] # Loop over all workflow roles and add a character select widget for each -# set form [list] -# set character_options [simulation::get_object_options -content_type sim_character] -# foreach role_id [workflow::get_roles -workflow_id $workflow_id] { -# lappend form [list role_${role_id}:text(select) \ -# [list label [workflow::get_element -role_id $role_id -element pretty_name]] \ -# [list options $character_options] -# ] -# } +set form [list] +set character_options [simulation::get_object_options -content_type sim_character] +foreach role_id [workflow::get_roles -workflow_id $workflow_id] { + set role_short_name [workflow::role::get_element -role_id $role_id -element short_name] + set role_pretty_name [workflow::role::get_element -role_id $role_id -element pretty_name] + lappend form [list role_${role_short_name}:text(select) \ + [list label $role_pretty_name] \ + [list options $character_options] + ] +} -# ad_form -name characters -form $form +ad_form \ + -name characters \ + -export { workflow_id } \ + -form $form \ + -on_submit { + + db_transaction { + # Create a new template that is clone of the existing one + set workflow_id [simulation::template::clone -workflow_id $workflow_id] + + # Map each role to chosen character + foreach role_id [workflow::get_roles -workflow_id $workflow_id] { + set role_short_name [workflow::role::get_element -role_id $role_id -element short_name] + simulation::role::edit -role_id $role_id -character_id [set role_${role_short_name}] + } + } + + # Proceed to the task page + ad_returnredirect [export_vars -base map-tasks {workflow_id}] + ad_script_abort + } Index: openacs-4/contrib/packages/simulation/www/siminst/map-create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-create.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/siminst/map-create.adp 28 Nov 2003 16:55:52 -0000 1.1 @@ -0,0 +1,6 @@ +<master> + <property name="title">@page_title;noquote@</property> + <property name="context">@context;noquote@</property> + <property name="focus">template.pretty_name</property> + +<formtemplate id="template"></formtemplate> Index: openacs-4/contrib/packages/simulation/www/siminst/map-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-create.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/siminst/map-create.tcl 28 Nov 2003 16:55:52 -0000 1.1 @@ -0,0 +1,35 @@ +ad_page_contract { + A page that creates a mapped template by cloning a ready template. + This is the first step in the mapping process. + + @author Peter Marklund +} { + workflow_id:integer +} + +set page_title "Create mapped template" +set context [list [list "." "SimInst"] $page_title] + +set old_name [workflow::get_element -workflow_id $workflow_id -element pretty_name] +set name_default "$old_name Mapped" + +ad_form \ + -name template \ + -export { workflow_id } \ + -form { + {pretty_name:text + {label "Template name"} + {value $name_default} + {html {size 50}} + } + } -on_submit { + # Create a new template that is clone of the existing one + set workflow_id [simulation::template::clone \ + -workflow_id $workflow_id \ + -pretty_name $pretty_name] + + # Proceed to the task page + ad_returnredirect [export_vars -base map-tasks {workflow_id}] + ad_script_abort + + } Index: openacs-4/contrib/packages/simulation/www/siminst/map-tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-tasks.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/siminst/map-tasks.tcl 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/siminst/map-tasks.tcl 28 Nov 2003 16:55:52 -0000 1.2 @@ -8,3 +8,4 @@ set page_title "Map to Tasks" set context [list [list "." "SimInst" ] $page_title] + Index: openacs-4/packages/simulation/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/tcl/apm-callback-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/simulation/tcl/apm-callback-procs.tcl 10 Nov 2003 16:56:56 -0000 1.7 +++ openacs-4/packages/simulation/tcl/apm-callback-procs.tcl 28 Nov 2003 16:55:52 -0000 1.8 @@ -19,7 +19,7 @@ ad_proc -private simulation::apm::after_instantiate { {-package_id:required} } { - Create the package root folder. + Create data associated with a simulation package instance. } { set instance_name [apm_instance_name_from_id $package_id] @@ -30,4 +30,20 @@ -package_id $package_id \ -context_id $package_id \ -content_types { sim_character sim_prop sim_location sim_stylesheet image }] + + application_group::new \ + -group_name "Simulation Test Class" \ + -package_id $package_id } + +ad_proc -private simulation::apm::before_uninstantiate { + {-package_id:required} +} { + Tear down data associated with a package instance. +} { + set folder_id [bcms::folder::get_id_by_package_id -parent_id 0] + bcms::folder::delete_folder -folder_id $folder_id + + set group_id [application_group::group_id_from_package_id -package_id $package_id] + group::delete $group_id +} Index: openacs-4/packages/simulation/tcl/object-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/tcl/object-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/simulation/tcl/object-procs.tcl 18 Nov 2003 13:31:32 -0000 1.5 +++ openacs-4/packages/simulation/tcl/object-procs.tcl 28 Nov 2003 16:55:52 -0000 1.6 @@ -9,6 +9,12 @@ namespace eval simulation::object {} namespace eval simulation::object::xml {} +############################### +# +# simulation::object namespace +# +############################### + ad_proc -private simulation::object::url { {-package_id ""} {-name:required} @@ -43,6 +49,12 @@ return "${package_url}object-content/${name}" } +############################### +# +# simulation::object::xml namespace +# +############################### + ad_proc -private simulation::object::xml::file_sweeper {} { Loop over all simulation package instances and re-generate XML map files for them. Index: openacs-4/packages/simulation/tcl/role-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/tcl/Attic/role-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/simulation/tcl/role-procs.tcl 18 Nov 2003 12:19:39 -0000 1.4 +++ openacs-4/packages/simulation/tcl/role-procs.tcl 28 Nov 2003 16:55:52 -0000 1.5 @@ -20,17 +20,39 @@ @author Peter Marklund } { db_transaction { - # create the role + set role_short_name [util_text_to_url -replacement "_" $role_short_name] set role_id [workflow::role::new \ -workflow_id $template_id \ -short_name $role_short_name \ -pretty_name $role_pretty_name] + db_dml insert_sim_role { + insert into sim_roles (role_id) values (:role_id) + } } } ad_proc -public simulation::role::delete { {-role_id:required} } { - workflow::role::delete -role_id $role_id + db_transaction { + workflow::role::delete -role_id $role_id + + db_dml delete_sim_role { + delete from sim_roles where role_id = :role_id + } + } } + +ad_proc -public simulation::role::edit { + {-role_id:required} + {-character_id:required} +} { + Edit a simulation role. +} { + db_dml edit_sim_role { + update sim_roles + set character_id = :character_id + where role_id = :role_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.12 -r1.13 --- openacs-4/packages/simulation/tcl/simulation-procs.tcl 14 Nov 2003 11:40:35 -0000 1.12 +++ openacs-4/packages/simulation/tcl/simulation-procs.tcl 28 Nov 2003 16:55:52 -0000 1.13 @@ -108,6 +108,124 @@ } } +ad_proc simulation::get_object_options { + {-content_type:required} +} { + Returns a list of cr_revision.title, cr_item.item_id pairs + for all cr_items of the given content_type in the root + folder of the current package. Suitable for ad_form options for + select boxes. + + @return [list [list cr_revision.title1 cr_item.item_id1] [list cr_revision.title2 cr_item.item_id2] ....] + + @author Peter Marklund +} { + set package_id [ad_conn package_id] + set parent_id [bcms::folder::get_id_by_package_id -package_id $package_id] + + return [db_list_of_lists character_options { + select cr.title, + ci.item_id + from cr_items ci, + cr_revisions cr + where ci.live_revision = cr.revision_id + and ci.parent_id = :parent_id + and ci.content_type = :content_type + }] +} + +ad_proc -public simulation::cast { + {-workflow_id:required} + {-pretty_name:required} + {-actors:required} + {-groupings:required} +} { + Takes a mapped simulation template and creates a casted simulation + with simulation cases. It does this by cloning the simulation + template. + + TODO: agent support + + TODO: taking actor type into account + + @param actors An array list with the actors of the simulation. The keys + of the list are role_ids and the values ids of the actor to play the role. + @param groups An array list with the groupings of the simulation. The keys + of the list are role_ids and the values are integers indicaing + a number of users to play that role. + + @return workflow_id of the simulation created. + + @author Peter Marklund +} { + array set actors_array $actors + array set groupings_array $groupings + + # TODO: make sure this is a proper clone also after mapping (tasks and characters...) + set workflow_id [simulation::template::clone \ + -pretty_name $pretty_name \ + -workflow_id $workflow_id] + + set user_list [db_list select_users { + select member_id + from party_approved_member_map + where party_id in (select + party_id from sim_party_sim_map + where simulation_id = :workflow_id + ) + }] + set total_n_users [llength $user_list] + + set n_users_per_case 0 + foreach role_id [array names groupings_array] { + set n_users_per_case [expr $n_users_per_case + $groupings_array($role_id)] + } + + set mod_n_users [expr $total_n_users % $n_users_per_case] + set n_cases [expr ($total_n_users - $mod_n_users) / $n_users_per_case] + + + if { $mod_n_users == "0" } { + # No rest in dividing, the cases add up nicely + + } else { + # We are missing mod_n_users to fill up the simulation. Create a new simulation + # for those students. + set n_cases [expr $n_cases + 1] + } + + # Create the cases and for each case assign roles to parties + set users_start_index 0 + for { set case_counter 0 } { $case_counter < $n_cases } { incr case_counter } { + # TODO: what should object_id be here? + set object_id [ad_conn package_id] + set case_id [workflow::case::new \ + -workflow_id $workflow_id \ + -object_id $object_id] + + # Assign a group of users to each role in the case + set party_array_list [list] + foreach role_id [array names actors] { + set role_short_name [workflow::role::get_element -role_id $role_id -element short_name] + + set users_end_index [expr $users_start_index + $groupings_array($role_id) - 1] + + set parties_list [lrange $user_list $users_start_index $users_end_index] + + lappend parties_array_list $role_short_name $users_list + + set users_start_index [expr $users_end_index + 1] + } + + workflow::case::role::assign \ + -case_id $case_id \ + -array $party_array_list \ + -replace + } + + return $workflow_id +} + template_tag relation { params } { publish::process_tag relation $params } Index: openacs-4/packages/simulation/tcl/template-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/tcl/template-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/simulation/tcl/template-procs.tcl 28 Nov 2003 11:12:39 -0000 1.4 +++ openacs-4/packages/simulation/tcl/template-procs.tcl 28 Nov 2003 16:55:52 -0000 1.5 @@ -26,6 +26,8 @@ set ready_p "f" } db_transaction { + set short_name [util_text_to_url -replacement "_" $short_name] + set workflow_id [workflow::new \ -short_name $short_name \ -pretty_name $pretty_name \ @@ -42,24 +44,40 @@ -short_name "dummy action" \ -pretty_name "dummy action" - set suggested_duration [string trim $suggested_duration] - if { [empty_string_p $suggested_duration] } { - db_dml new_sim { - insert into sim_simulations - (simulation_id, ready_p) - values (:workflow_id, :ready_p) - } - } else { - db_dml new_sim " - insert into sim_simulations - (simulation_id, ready_p, suggested_duration) - values ('$workflow_id', '$ready_p', interval '$suggested_duration')" - } + insert_sim \ + -workflow_id $workflow_id \ + -ready_p $ready_p \ + -suggested_duration $suggested_duration } return $workflow_id } +ad_proc -private simulation::template::insert_sim { + {-workflow_id:required} + {-ready_p:required} + {-suggested_duration:required} +} { + Internal proc for inserting values into the sim_simulations + table that are set prior to a template being mapped. + + @author Peter Marklund +} { + set suggested_duration [string trim $suggested_duration] + if { [empty_string_p $suggested_duration] } { + db_dml new_sim { + insert into sim_simulations + (simulation_id, ready_p) + values (:workflow_id, :ready_p) + } + } else { + db_dml new_sim " + insert into sim_simulations + (simulation_id, ready_p, suggested_duration) + values ('$workflow_id', '$ready_p', interval '$suggested_duration')" + } +} + ad_proc -public simulation::template::edit { {-workflow_id:required} {-short_name:required} @@ -106,6 +124,98 @@ } } +ad_proc -public simulation::template::instantiate_edit { + {-workflow_id:required} + {-enroll_start:required} + {-enroll_end:required} + {-notification_date:required} + {-case_start:required} + {-case_end:required} + {-enroll_type:required} + {-casting_type:required} + {-parties:required} +} { + Edit properties of a simulation set during instantiation. + + TODO: merge this proc with ::edit? + + @author Peter Marklund +} { + db_dml update_instantiate_template { + update sim_simulations + set enroll_start = to_date(:enroll_start, 'YYYY-MM-DD'), + enroll_end = to_date(:enroll_end, 'YYYY-MM-DD'), + send_start_note_date = to_date(:notification_date, 'YYYY-MM-DD'), + case_start = to_date(:case_start, 'YYYY-MM-DD'), + case_end = to_date(:case_end, 'YYYY-MM-DD'), + enroll_type = :enroll_type, + casting_type = :casting_type + where simulation_id = :workflow_id + } + + # Clear out old mappings first + db_dml clear_old_mappings { + delete from sim_party_sim_map + where simulation_id = :workflow_id + } + + foreach party_id $parties { + db_dml map_party_to_template { + insert into sim_party_sim_map + (simulation_id, party_id) + values (:workflow_id, :party_id) + } + } +} +ad_proc -public simulation::template::clone { + {-workflow_id:required} + {-pretty_name:required} +} { + Create a new simulation template which is a clone of the template with + given id. The clone will be mapped to the package of the current request. + + @param workflow_id The id of the template that you wish to clone. + @param pretty_name The pretty name of the clone you are creating. + + @return The id of the clone. + + @author Peter Marklund +} { + # If we set object_id here and leave short_name unchanged we + # get a unique constraint violation + set clone_workflow_id [workflow::fsm::clone \ + -workflow_id $workflow_id] + + # Set names of clones workflow and update the object_id + # TODO: create workflow::edit proc + set clone_short_name [util_text_to_url -replacement "_" $pretty_name] + set object_id [ad_conn package_id] + db_dml update_short_name { + update workflows + set short_name = :clone_short_name, + pretty_name = :pretty_name, + object_id = :object_id + where workflow_id = :clone_workflow_id + } + + # Add the role_id:s to the sim_roles table + set role_id_list [workflow::get_roles -workflow_id $clone_workflow_id] + foreach role_id $role_id_list { + db_dml insert_sim_role { + insert into sim_roles (role_id) values (:role_id) + } + } + + # Clone the values in the simulation table + get -workflow_id $workflow_id -array workflow + insert_sim \ + -workflow_id $clone_workflow_id \ + -ready_p $workflow(ready_p) \ + -suggested_duration $workflow(suggested_duration) + + return $clone_workflow_id +} + ad_proc -public simulation::template::get { {-workflow_id:required} {-array:required} Index: openacs-4/packages/simulation/test/crawl-links.test =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/test/Attic/crawl-links.test,v diff -u -r1.2 -r1.3 --- openacs-4/packages/simulation/test/crawl-links.test 19 Nov 2003 10:05:07 -0000 1.2 +++ openacs-4/packages/simulation/test/crawl-links.test 28 Nov 2003 16:55:52 -0000 1.3 @@ -9,7 +9,7 @@ ::twt::log_section "Login the site wide admin" ::twt::user::login_site_wide_admin - ::twt::set_crawler_exclude_links {delete} + ::twt::set_crawler_exclude_links {delete remove} # NOTE: The crawler needs the trailing slash when first invoked set simulation_uri /simulation/ Index: openacs-4/packages/simulation/test/demo-data-setup.test =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/test/demo-data-setup.test,v diff -u -r1.6 -r1.7 --- openacs-4/packages/simulation/test/demo-data-setup.test 19 Nov 2003 07:40:46 -0000 1.6 +++ openacs-4/packages/simulation/test/demo-data-setup.test 28 Nov 2003 16:55:52 -0000 1.7 @@ -75,6 +75,8 @@ do_request /simulation/simbuild/template-edit set template_name "Elementary Private Law" field fill $template_name ~n name + field find ~n ready_p + field fill t form submit ::twt::log_section "Create roles for template" Index: openacs-4/packages/simulation/www/doc/admin.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/admin.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/simulation/www/doc/admin.html 14 Nov 2003 14:03:11 -0000 1.2 +++ openacs-4/packages/simulation/www/doc/admin.html 28 Nov 2003 16:55:52 -0000 1.3 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Admin Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="package-install.html" title="Package installation"><link rel="next" href="map_xml.html" title="Map XML"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="package-install.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="map_xml.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="admin"></a>Admin Guide</h2></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="map_xml.html">Map XML</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="package-install.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="map_xml.html">Next</a></td></tr><tr><td width="40%" align="left">Package installation </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Map XML</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/admin.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Admin Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="package-install.html" title="Package installation"><link rel="next" href="map_xml.html" title="Map XML"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="package-install.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="map_xml.html">Next</a></td></tr></table><hr></div><div class="article"><div class="titlepage"><div><h2 class="title"><a name="admin"></a>Admin Guide</h2></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="map_xml.html">Map XML</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="package-install.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="map_xml.html">Next</a></td></tr><tr><td width="40%" align="left">Package installation </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Map XML</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/admin.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/packages/simulation/www/doc/design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/design.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/simulation/www/doc/design.html 14 Nov 2003 14:03:11 -0000 1.6 +++ openacs-4/packages/simulation/www/doc/design.html 28 Nov 2003 16:55:52 -0000 1.7 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="map_xml.html" title="Map XML"><link rel="next" href="interfaces.html" title="Interfaces"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="map_xml.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="interfaces.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="design"></a>Design</h2></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="interfaces.html">Interfaces</a></span></dt><dt><span class="sect1"><a href="internals.html">Internal Design</a></span></dt><dt><span class="sect1"><a href="permissions.html">Permissions</a></span></dt><dt><span class="sect1"><a href="object-orientation-notes.html">Notes on an object-oriented simulated space</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="map_xml.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="interfaces.html">Next</a></td></tr><tr><td width="40%" align="left">Map XML </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Interfaces</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/design.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="map_xml.html" title="Map XML"><link rel="next" href="interfaces.html" title="Interfaces"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="map_xml.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="interfaces.html">Next</a></td></tr></table><hr></div><div class="article"><div class="titlepage"><div><h2 class="title"><a name="design"></a>Design</h2></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="interfaces.html">Interfaces</a></dt><dt><a href="internals.html">Internal Design</a></dt><dt><a href="permissions.html">Permissions</a></dt><dt><a href="object-orientation-notes.html">Notes on an object-oriented simulated space</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="map_xml.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="interfaces.html">Next</a></td></tr><tr><td width="40%" align="left">Map XML </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Interfaces</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/design.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/packages/simulation/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/index.html,v diff -u -r1.8 -r1.9 --- openacs-4/packages/simulation/www/doc/index.html 26 Nov 2003 16:44:50 -0000 1.8 +++ openacs-4/packages/simulation/www/doc/index.html 28 Nov 2003 16:55:52 -0000 1.9 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Simulation</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="next" href="install.html" title="Installation"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr></table><hr></div><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2762182"></a>Simulation</h1></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="install.html">Installation</a></span></dt><dd><dl><dt><span class="sect1"><a href="package-install.html">Package installation</a></span></dt></dl></dd><dt><span class="article"><a href="admin.html">Admin Guide</a></span></dt><dd><dl><dt><span class="sect1"><a href="map_xml.html">Map XML</a></span></dt></dl></dd><dt><span class="article"><a href="design.html">Design</a></span></dt><dd><dl><dt><span class="sect1"><a href="interfaces.html">Interfaces</a></span></dt><dt><span class="sect1"><a href="internals.html">Internal Design</a></span></dt><dt><span class="sect1"><a href="permissions.html">Permissions</a></span></dt><dt><span class="sect1"><a href="object-orientation-notes.html">Notes on an object-oriented simulated space</a></span></dt></dl></dd><dt><span class="appendix"><a href="licensing.html">A. Licencing</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> Installation</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/index.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Simulation</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="next" href="install.html" title="Installation"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><div><h1 class="title"><a name="id2768914"></a>Simulation</h1></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="install.html">Installation</a></dt><dd><dl><dt><a href="package-install.html">Package installation</a></dt></dl></dd><dt><a href="admin.html">Admin Guide</a></dt><dd><dl><dt><a href="map_xml.html">Map XML</a></dt></dl></dd><dt><a href="design.html">Design</a></dt><dd><dl><dt><a href="interfaces.html">Interfaces</a></dt><dt><a href="internals.html">Internal Design</a></dt><dt><a href="permissions.html">Permissions</a></dt><dt><a href="object-orientation-notes.html">Notes on an object-oriented simulated space</a></dt></dl></dd><dt>A. <a href="licensing.html">Licencing</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> Installation</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/index.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/packages/simulation/www/doc/install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/install.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/simulation/www/doc/install.html 14 Nov 2003 14:03:11 -0000 1.4 +++ openacs-4/packages/simulation/www/doc/install.html 28 Nov 2003 16:55:52 -0000 1.5 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="index.html" title="Simulation"><link rel="next" href="package-install.html" title="Package installation"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="package-install.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="install"></a>Installation</h2></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="package-install.html">Package installation</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="package-install.html">Next</a></td></tr><tr><td width="40%" align="left">Simulation </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Package installation</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/install.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="index.html" title="Simulation"><link rel="next" href="package-install.html" title="Package installation"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="package-install.html">Next</a></td></tr></table><hr></div><div class="article"><div class="titlepage"><div><h2 class="title"><a name="install"></a>Installation</h2></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="package-install.html">Package installation</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="package-install.html">Next</a></td></tr><tr><td width="40%" align="left">Simulation </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Package installation</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/install.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/packages/simulation/www/doc/interfaces.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/interfaces.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/simulation/www/doc/interfaces.html 14 Nov 2003 11:30:37 -0000 1.2 +++ openacs-4/packages/simulation/www/doc/interfaces.html 28 Nov 2003 16:55:52 -0000 1.3 @@ -1,2 +1,3 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Interfaces</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="design.html" title="Design"><link rel="next" href="internals.html" title="Internal Design"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="design.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="interfaces"></a>Interfaces</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="page-map"></a>Page Map</h3></div></div><div></div></div><div class="mediaobject"><img src="page-map.png"></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="tcl-api"></a>TCL API</h3></div></div><div></div></div><p><a href="/api-doc/proc-search?query_string=simulation%3A%3A&search_type=All+matches" target="_top">TCL API</a></p><p>Each TCL API item should include inputs, outputs, and a - comment block describing any non-obvious internal issues.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sql-api"></a>SQL API</h3></div></div><div></div></div><p>None yet.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="design.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr><tr><td width="40%" align="left">Design </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Internal Design</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/interfaces.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Interfaces</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="design.html" title="Design"><link rel="next" href="internals.html" title="Internal Design"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="design.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="interfaces"></a>Interfaces</h2></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="page-map"></a>Page Map</h3></div></div><div class="mediaobject"><img src="page-map.png"></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="tcl-api"></a>TCL API</h3></div></div><p><a href="/api-doc/proc-search?query_string=simulation%3A%3A&search_type=All%2Bmatches" target="_top">TCL API</a></p><p>Each TCL API item should include inputs, outputs, and a + comment block describing any non-obvious internal issues.</p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="sql-api"></a>SQL API</h3></div></div><p>None yet.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="design.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr><tr><td width="40%" align="left">Design </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Internal Design</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/interfaces.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/packages/simulation/www/doc/internals.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/internals.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/simulation/www/doc/internals.html 14 Nov 2003 14:03:11 -0000 1.3 +++ openacs-4/packages/simulation/www/doc/internals.html 28 Nov 2003 16:55:52 -0000 1.4 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Internal Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="interfaces.html" title="Interfaces"><link rel="next" href="permissions.html" title="Permissions"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="interfaces.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="permissions.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="internals"></a>Internal Design</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="data-model"></a>Data Model</h3></div></div><div></div></div><div class="mediaobject"><img src="data-model.png"></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="interfaces.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="permissions.html">Next</a></td></tr><tr><td width="40%" align="left">Interfaces </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Permissions</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/internals.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Internal Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="interfaces.html" title="Interfaces"><link rel="next" href="permissions.html" title="Permissions"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="interfaces.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="permissions.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="internals"></a>Internal Design</h2></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="data-model"></a>Data Model</h3></div></div><div class="mediaobject"><img src="data-model.png"></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="interfaces.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="permissions.html">Next</a></td></tr><tr><td width="40%" align="left">Interfaces </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Permissions</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/internals.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/packages/simulation/www/doc/licensing.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/licensing.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/doc/licensing.html 14 Nov 2003 14:03:11 -0000 1.1 +++ openacs-4/packages/simulation/www/doc/licensing.html 28 Nov 2003 16:55:52 -0000 1.2 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Appendix�A.�Licencing</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="object-orientation-notes.html" title="Notes on an object-oriented simulated space"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="object-orientation-notes.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> </td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="licensing"></a>Appendix�A.�Licencing</h2></div></div><div></div></div><p>TODO</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="object-orientation-notes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left">Notes on an object-oriented simulated space </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> </td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/licensing.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Appendix A. Licencing</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="index.html" title="Simulation"><link rel="previous" href="object-orientation-notes.html" title="Notes on an object-oriented simulated space"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="object-orientation-notes.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> </td></tr></table><hr></div><div class="appendix"><div class="titlepage"><div><h2 class="title"><a name="licensing"></a>Appendix A. Licencing</h2></div></div><p>TODO</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="object-orientation-notes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left">Notes on an object-oriented simulated space </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> </td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/licensing.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/packages/simulation/www/doc/map_xml.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/map_xml.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/doc/map_xml.html 12 Nov 2003 11:17:28 -0000 1.1 +++ openacs-4/packages/simulation/www/doc/map_xml.html 28 Nov 2003 16:55:52 -0000 1.2 @@ -1,4 +1,5 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Map XML</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="admin.html" title="Admin Guide"><link rel="previous" href="admin.html" title="Admin Guide"><link rel="next" href="design.html" title="Design"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="admin.html">Prev</a> </td><th width="60%" align="center">Admin Guide</th><td width="20%" align="right"> <a accesskey="n" href="design.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="map_xml"></a>Map XML</h2></div></div><div></div></div><p> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Map XML</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="admin.html" title="Admin Guide"><link rel="previous" href="admin.html" title="Admin Guide"><link rel="next" href="design.html" title="Design"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="admin.html">Prev</a> </td><th width="60%" align="center">Admin Guide</th><td width="20%" align="right"> <a accesskey="n" href="design.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="map_xml"></a>Map XML</h2></div></div><p> The simulation package will nightly generate an XML file with information needed for the SIMBUILD flash map. The objects in the XML file will be those that are supposed to appear on the map, i.e. those that have the on_map_p attribute set to true. The file Index: openacs-4/packages/simulation/www/doc/object-orientation-notes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/object-orientation-notes.html,v diff -u -r1.8 -r1.9 --- openacs-4/packages/simulation/www/doc/object-orientation-notes.html 26 Nov 2003 16:44:50 -0000 1.8 +++ openacs-4/packages/simulation/www/doc/object-orientation-notes.html 28 Nov 2003 16:55:52 -0000 1.9 @@ -1,4 +1,5 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Notes on an object-oriented simulated space</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="permissions.html" title="Permissions"><link rel="next" href="licensing.html" title="Appendix�A.�Licencing"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="permissions.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="licensing.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="object-orientation-notes"></a>Notes on an object-oriented simulated space</h2></div></div><div></div></div><p>An OpenACS simulation is a collection of interactive +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Notes on an object-oriented simulated space</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="permissions.html" title="Permissions"><link rel="next" href="licensing.html" title="Appendix A. Licencing"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="permissions.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="licensing.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="object-orientation-notes"></a>Notes on an object-oriented simulated space</h2></div></div><p>An OpenACS simulation is a collection of interactive objects, plus a set of roles and tasks. In the first part, it is conceptually similar to a MOO (Multiple-User Dungeon, Object-Oriented). This is a technology dating to 1990, in which @@ -10,7 +11,7 @@ Games), which are essentially MOOs with graphical instead of textual interfaces. Given their lineage and success, it makes sense to draw on MOO technology when designing our simulation - object model.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="verbs"></a>Objects</h3></div></div><div></div></div><p>Basic MOO objects</p><pre class="programlisting"> + object model.</p><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="verbs"></a>Objects</h3></div></div><p>Basic MOO objects</p><pre class="programlisting"> Root Class Room Thing @@ -27,13 +28,13 @@ Exit Container Openable Container -</pre><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2824733"></a>Object Attributes</h4></div></div><div></div></div><p>(From the LambdaMOO Programmer's Manual</p><pre class="programlisting"> +</pre><div class="sect3"><div class="titlepage"><div><h4 class="title"><a name="id2767803"></a>Object Attributes</h4></div></div><p>(From the LambdaMOO Programmer's Manual</p><pre class="programlisting"> There are three fundamental attributes to every object: 1. A flag (either true or false) specifying whether or not the object represents a player, 2. The object that is its parent, and 3. A list of the objects that are its children; that is, those - objects for which this object is their parent. </pre><p>"Every object has eight built-in properties whose values are constrained to be of particular types. "</p><pre class="programlisting"> + objects for which this object is their parent. </pre><p>"Every object has eight built-in properties whose values are constrained to be of particular types. "</p><pre class="programlisting"> name a string, the usual name for this object owner an object, the player who controls access to it location an object, where the object is in virtual reality @@ -43,4 +44,4 @@ r a bit, is the object publicly readable? w a bit, is the object publicly writable? f a bit, is the object fertile? -</pre></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="verbs"></a>Verbs</h3></div></div><div></div></div><p>Minimal MOO verbs:</p><div class="itemizedlist"><ul type="disc"><li><p>put</p><p>take</p><p>get</p><p>drop</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="permissions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="licensing.html">Next</a></td></tr><tr><td width="40%" align="left">Permissions </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Appendix�A.�Licencing</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/object-orientation-notes.html#comments">View comments on this page at openacs.org</a></center></body></html> +</pre></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="verbs"></a>Verbs</h3></div></div><p>Minimal MOO verbs:</p><div class="itemizedlist"><ul type="disc"><li><p>put</p><p>take</p><p>get</p><p>drop</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="permissions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="licensing.html">Next</a></td></tr><tr><td width="40%" align="left">Permissions </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Appendix A. Licencing</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/object-orientation-notes.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/packages/simulation/www/doc/package-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/package-install.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/doc/package-install.html 14 Nov 2003 14:03:11 -0000 1.1 +++ openacs-4/packages/simulation/www/doc/package-install.html 28 Nov 2003 16:55:52 -0000 1.2 @@ -1,4 +1,5 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Package installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="install.html" title="Installation"><link rel="previous" href="install.html" title="Installation"><link rel="next" href="admin.html" title="Admin Guide"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="install.html">Prev</a> </td><th width="60%" align="center">Installation</th><td width="20%" align="right"> <a accesskey="n" href="admin.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="package-install"></a>Package installation</h2></div></div><div></div></div><p>Requires workflow and bcms and their prerequisites.</p><div class="itemizedlist"><ul type="disc"><li><p> Option 1: use a custom tarball which includes those modules. In +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Package installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="install.html" title="Installation"><link rel="previous" href="install.html" title="Installation"><link rel="next" href="admin.html" title="Admin Guide"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="install.html">Prev</a> </td><th width="60%" align="center">Installation</th><td width="20%" align="right"> <a accesskey="n" href="admin.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="package-install"></a>Package installation</h2></div></div><p>Requires workflow and bcms and their prerequisites.</p><div class="itemizedlist"><ul type="disc"><li><p> Option 1: use a custom tarball which includes those modules. In that case, the custom tarball will have a file install.xml in its root directory, so that installing OpenACS normally will produce a simulation server. </p><p>Notes on custom tarball creation:</p><pre class="programlisting"> Index: openacs-4/packages/simulation/www/doc/permissions.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/permissions.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/simulation/www/doc/permissions.html 26 Nov 2003 16:44:50 -0000 1.2 +++ openacs-4/packages/simulation/www/doc/permissions.html 28 Nov 2003 16:55:52 -0000 1.3 @@ -1 +1,2 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Permissions</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="internals.html" title="Internal Design"><link rel="next" href="object-orientation-notes.html" title="Notes on an object-oriented simulated space"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="object-orientation-notes.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="permissions"></a>Permissions</h2></div></div><div></div></div><p><a href="permissions-table" target="_top">Permissions Table</a> (<a href="permissions-table.sxc" target="_top">OO spreadsheet</a>)</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="object-orientation-notes.html">Next</a></td></tr><tr><td width="40%" align="left">Internal Design </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Notes on an object-oriented simulated space</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/permissions.html#comments">View comments on this page at openacs.org</a></center></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Permissions</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Simulation"><link rel="up" href="design.html" title="Design"><link rel="previous" href="internals.html" title="Internal Design"><link rel="next" href="object-orientation-notes.html" title="Notes on an object-oriented simulated space"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Design</th><td width="20%" align="right"> <a accesskey="n" href="object-orientation-notes.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="permissions"></a>Permissions</h2></div></div><p><a href="permissions-table" target="_top">Permissions Table</a> (<a href="permissions-table.sxc" target="_top">OO spreadsheet</a>)</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="object-orientation-notes.html">Next</a></td></tr><tr><td width="40%" align="left">Internal Design </td><td width="20%" align="center"><a accesskey="u" href="design.html">Up</a></td><td width="40%" align="right"> Notes on an object-oriented simulated space</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/permissions.html#comments">View comments on this page at openacs.org</a></center></body></html> Index: openacs-4/packages/simulation/www/doc/xml/Makefile =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/doc/xml/Makefile,v diff -u -r1.4 -r1.5 --- openacs-4/packages/simulation/www/doc/xml/Makefile 26 Nov 2003 16:44:50 -0000 1.4 +++ openacs-4/packages/simulation/www/doc/xml/Makefile 28 Nov 2003 16:55:52 -0000 1.5 @@ -18,4 +18,4 @@ all: - cd .. ; $(XSLTPROC) --nonet --novalid --xinclude ../../../../packages/acs-core-docs/www/xml/openacs.xsl xml/index.xml \ No newline at end of file + cd .. ; $(XSLTPROC) --nonet --novalid --xinclude ../../../acs-core-docs/www/xml/openacs.xsl xml/index.xml \ No newline at end of file Index: openacs-4/packages/simulation/www/siminst/cast-actors.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/cast-actors.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/siminst/cast-actors.adp 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/packages/simulation/www/siminst/cast-actors.adp 28 Nov 2003 16:55:52 -0000 1.2 @@ -2,17 +2,17 @@ <property name="title">@page_title;noquote@</property> <property name="context">@context;noquote@</property> +<formtemplate id="actors"></formtemplate> + +<p> +TODO: get desired layout, see below: +</p> + <center> (this is just a mockup) <table width="60%"> -<tr><th>Role</th><th>Character</th><th>Actor(s)</th><th>In groups of</th></tr> -<tr><td>Plaintiff</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> +<tr><th>Role</th><th>Actor(s)</th><th>In groups of</th></tr> +<tr><td>Plaintiff</td> <td><select> <option>Automatic Agent</option> <option>Student</option> @@ -24,13 +24,7 @@ </select> </td> </tr> -<tr><td>Defendent</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> +<tr><td>Defendent</td> <td><select> <option>Automatic Agent</option> <option>Student</option> @@ -41,13 +35,7 @@ <td><input type="text" size="2" value="1"></input> </td> </tr> -<tr><td>Judge</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> +<tr><td>Judge</td> <td><select> <option>Student</option> <option>TA</option> Index: openacs-4/packages/simulation/www/siminst/cast-actors.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/cast-actors.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/siminst/cast-actors.tcl 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/packages/simulation/www/siminst/cast-actors.tcl 28 Nov 2003 16:55:52 -0000 1.2 @@ -10,3 +10,45 @@ set page_title "Choose actors" set context [list [list "." "SimInst"] $page_title] + +# Loop over all workflow roles and append the actor and "in groups of" widgets to the form +set form { + {pretty_name:text + {label "Simulation name"} + {html {size 50}} + } +} + +foreach role_id [workflow::get_roles -workflow_id $workflow_id] { + set role_pretty_name [workflow::role::get_element -role_id $role_id -element pretty_name] + lappend form [list actor_${role_id}:text(select) \ + [list label $role_pretty_name] \ + [list options {{Student student} {Professor professor}}] + ] + lappend form [list group_${role_id}:integer [list label "In groups of"] [list value 1]] +} + +ad_form \ + -name actors \ + -export { workflow_id } \ + -form $form \ + -on_submit { + + # Put the actor and grouping selections on array list formats + set actors_list [list] + set groups_list [list] + foreach role_id [workflow::get_roles -workflow_id $workflow_id] { + lappend actors_list $role_id [set actor_$role_id] + lappend groups_list $role_id [set group_$role_id] + } + + simulation::cast \ + -workflow_id $workflow_id \ + -pretty_name $pretty_name \ + -actors $actors_list \ + -groups $groups_list + + # Proceed to the instantiation complete page + ad_returnredirect [export_vars -base cast-complete {workflow_id}] + ad_script_abort + } \ No newline at end of file Index: openacs-4/packages/simulation/www/siminst/cast-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/cast-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/siminst/cast-edit.tcl 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/packages/simulation/www/siminst/cast-edit.tcl 28 Nov 2003 16:55:52 -0000 1.2 @@ -5,37 +5,79 @@ } set page_title "Create/edit simulation" -set context [list $page_title] +set context [list [list "." "SimInst"] $page_title] set package_id [ad_conn package_id] +# TODO: only one aplication group per package - need different solution +set group_id [application_group::group_id_from_package_id -package_id $package_id] +set group_name [group::get_element -group_id $group_id -element group_name] +set group_options [list [list $group_name $group_id]] + +# TODO: Possible future casting_type options: +# choose_role +# choose_role_and_instance + +# TODO: provide more sensible default dates? +# Notification send could be start date minus some parameter +set in_a_month_date [clock format [expr [clock seconds] + 3600*24*31] -format "%Y %m %d"] +set in_two_months_date [clock format [expr [clock seconds] + 2*3600*24*31] -format "%Y %m %d"] +set in_two_and_a_half_months_date [clock format [expr [clock seconds] + 3*3600*24*31 - 3600*24*15] -format "%Y %m %d"] +set in_three_months_date [clock format [expr [clock seconds] + 3*3600*24*31] -format "%Y %m %d"] +set in_four_months_date [clock format [expr [clock seconds] + 4*3600*24*31] -format "%Y %m %d"] ad_form -export { workflow_id } -name simulation \ -form { - {enroll_start + {enroll_start:date,optional {label "Enrollment start date"} + {value $in_a_month_date} } - {enroll_end + {enroll_end:date,optional {label "Enrollment end date"} + {value $in_two_months_date} } - {notification_date + {notification_date:date {label "Date to send start notification"} + {value $in_two_and_a_half_months_date} } - {case_start + {case_start:date {label "Simulation start date"} + {value $in_three_months_date} } - {case_end + {case_end:date {label "Simulation end date"} + {value $in_four_months_date} } - {enroll_type - {label "Open Enrollment?"} + {enroll_type:text(radio) + {label "Enrollment type"} + {options {{Closed closed}}} + {value closed} } - {casting_type - {label "Open casting?"} + {casting_type:text(radio) + {label "Casting type"} + {options {{Automatic automatic}}} + {value automatic} } - {tools - {label "tools for enrollment and casting. (upload of user list csv, ... others?) TODO..."} + {user_group:integer(select) + {label "User Group"} + {options $group_options} } } -on_submit { - # TODO (clone the template and create a new simulation record) - ad_returnredirect simulation-casting + # Convert dates to ANSI format + foreach var_name {enroll_start enroll_end notification_date case_start case_end} { + set ${var_name}_ansi "[lindex [set $var_name] 0]-[lindex [set $var_name] 1]-[lindex [set $var_name] 2]" + } + + simulation::template::instantiate_edit \ + -workflow_id $workflow_id \ + -enroll_start $enroll_start_ansi \ + -enroll_end $enroll_end_ansi \ + -notification_date $notification_date_ansi \ + -case_start $case_start_ansi \ + -case_end $case_end_ansi \ + -enroll_type $enroll_type \ + -casting_type $casting_type \ + -parties $user_group + + # Proceed to choosing actors + ad_returnredirect [export_vars -base cast-actors { workflow_id }] ad_script_abort } 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 -r1.6 -r1.7 --- openacs-4/packages/simulation/www/siminst/index.adp 27 Nov 2003 16:43:36 -0000 1.6 +++ openacs-4/packages/simulation/www/siminst/index.adp 28 Nov 2003 16:55:52 -0000 1.7 @@ -5,12 +5,14 @@ <h2>Templates Ready for Mapping</h2> <p> - <listtemplate name="avail_templates"></listtemplate> + <listtemplate name="ready_templates"></listtemplate> </p> <h2>Mapped Templates</h2> -TODO... +<p> + <listtemplate name="mapped_templates"></listtemplate> +</p> <h2>Current Simulations</h2> <p> @@ -20,7 +22,7 @@ <h2>Help</h2> <p> - The process of creating a simulation form a simulation template is referred to as instantiation. The + The process of creating a simulation form a simulation template is referred to as <b>instantiation</b>. The instantiation process is divided into two steps: <ol> 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 -r1.3 -r1.4 --- openacs-4/packages/simulation/www/siminst/index.tcl 27 Nov 2003 16:43:36 -0000 1.3 +++ openacs-4/packages/simulation/www/siminst/index.tcl 28 Nov 2003 16:55:52 -0000 1.4 @@ -6,65 +6,112 @@ set context [list $page_title] set package_id [ad_conn package_id] -###################################################################### -# -# avail_templates -# -# A list of templates that can be instantiated -# -###################################################################### - #--------------------------------------------------------------------- -# avail_templates list +# Templates ready for mapping #--------------------------------------------------------------------- -set elements { - pretty_name { - label "Template" - orderby upper(w.pretty_name) - } - suggested_duration { - label "Suggested Duration" - orderby suggested_duration - } - number_of_roles { - label "Roles" - orderby number_of_roles - } - min_number_of_human_roles { - label "Min \# of players" - orderby min_number_of_human_roles - } - instantiate { - link_url_col inst_url - display_template { - Start mapping process +# TODO: new columns: +# number_of_roles +# number_of_roles_not_cast +# number_of_tasks +# number_of_tasks_undescribed +# number_of_prop_slots +# number_of_prop_unfilled +# TODO: +# only show casting link if all the mapping parts are complete +template::list::create \ + -name ready_templates \ + -multirow ready_templates \ + -no_data "No templates are ready for mapping" \ + -elements { + pretty_name { + label "Template" + orderby upper(w.pretty_name) } + suggested_duration { + label "Suggested Duration" + orderby suggested_duration + } + number_of_roles { + label "Roles" + orderby number_of_roles + } + min_number_of_human_roles { + label "Min \# of players" + orderby min_number_of_human_roles + } + map { + link_url_col map_url + display_template { + Begin mapping + } + } } -} -template::list::create \ - -name avail_templates \ - -multirow avail_templates \ - -no_data "No simulation templates available for instantiation." \ - -elements $elements - -#--------------------------------------------------------------------- -# avail_templates multirow -#--------------------------------------------------------------------- - -# TODO: number_of_roles, min_number_of_human_roles -db_multirow -extend {inst_url} avail_templates select_avail_templates " +# TODO: min_number_of_human_roles should take agents into account +db_multirow -extend {map_url} ready_templates select_ready_templates { select workflow_id, suggested_duration, pretty_name, - (select 1) as number_of_roles, - (select 1) as min_number_of_human_roles + (select count(*) + from workflow_roles + where workflow_id = w.workflow_id) as number_of_roles, + (select count(*) + from workflow_roles + where workflow_id = w.workflow_id) as min_number_of_human_roles from sim_simulations ss, workflows w where ss.simulation_id = w.workflow_id and w.object_id = :package_id and ready_p = 't' -" { - set inst_url [export_vars -base "map-characters" { workflow_id }] +} { + set map_url [export_vars -base "map-create" { workflow_id }] + + if { [empty_string_p $suggested_duration] } { + set suggested_duration "none specified" + } } + +#--------------------------------------------------------------------- +# Mapped templates +#--------------------------------------------------------------------- + +template::list::create \ + -name mapped_templates \ + -multirow mapped_templates \ + -no_data "No templates have been mapped" \ + -elements { + pretty_name { + label "Template" + orderby upper(w.pretty_name) + } + cast { + link_url_col cast_url + display_template { + Begin casting + } + } + } + +# TODO: update the mapped_p subquery for agents +# Simpler solution: +# type column with possible values: +# incomplete_template +# ready_template +# mapped_template +# simulation +# and not exists (select 1 +# from sim_roles sr, +# workflow_roles wr +# where sr.role_id = wr.role_id +# and sr.character_id is null +# and wr.workflow_id = w.workflow_id +# ) +db_multirow -extend { cast_url } mapped_templates select_mapped_templates { + select w.workflow_id, + w.pretty_name + from workflows w + where w.object_id = :package_id +} { + set cast_url [export_vars -base "cast-edit" { workflow_id }] +} Index: openacs-4/packages/simulation/www/siminst/map-characters.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/map-characters.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/siminst/map-characters.adp 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/packages/simulation/www/siminst/map-characters.adp 28 Nov 2003 16:55:52 -0000 1.2 @@ -2,64 +2,45 @@ <property name="title">@page_title;noquote@</property> <property name="context">@context;noquote@</property> -<center> -(this is just a mockup) -<table width="60%"> -<tr><th>Role</th><th>Character</th><th>Actor(s)</th><th>In groups of</th></tr> -<tr><td>Plaintiff</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> -<td><select> - <option>Automatic Agent</option> - <option>Student</option> - <option>TA</option> - <option>Professor</option> -</select> -</td> -<td><input type="text" size="2" value="1"></input> -</select> -</td> -</tr> -<tr><td>Defendent</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> -<td><select> - <option>Automatic Agent</option> - <option>Student</option> - <option>TA</option> - <option>Professor</option> -</select> -</td> -<td><input type="text" size="2" value="1"></input> -</td> -</tr> -<tr><td>Judge</td><td> -<select> - <option>Bob</option> - <option>Jianing (Lawfirm X)</option> - <option>Larry (Lawfirm Y)</option> -</select> -</td> -<td><select> - <option>Student</option> - <option>TA</option> - <option>Professor</option> -</select> -</td> -<td><input type="text" size="2" value="1"></input> -</td> -</tr> -</table> -</center> +<formtemplate id="characters"></formtemplate> + <p> - <a href="map-tasks?workflow_id=@workflow_id@">Map to tasks</a> +TODO: get desired layout, see below: </p> + +<center> + (this is just a mockup) + <table width="60%"> + <tr> + <th>Role</th> + <th>Character</th> + </tr> + <tr> + <td>Plaintiff</td> + <td> + <select> + <option>Bob</option> + <option>Jianing (Lawfirm X)</option> + <option>Larry (Lawfirm Y)</option> + </select> + </td> + </tr> + <tr><td>Defendent</td><td> + <select> + <option>Bob</option> + <option>Jianing (Lawfirm X)</option> + <option>Larry (Lawfirm Y)</option> + </select> + </td> + </tr> + <tr><td>Judge</td><td> + <select> + <option>Bob</option> + <option>Jianing (Lawfirm X)</option> + <option>Larry (Lawfirm Y)</option> + </select> + </td> + </tr> + </table> +</center> Index: openacs-4/packages/simulation/www/siminst/map-characters.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/map-characters.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/simulation/www/siminst/map-characters.tcl 28 Nov 2003 09:32:26 -0000 1.2 +++ openacs-4/packages/simulation/www/siminst/map-characters.tcl 28 Nov 2003 16:55:52 -0000 1.3 @@ -12,13 +12,35 @@ set context [list [list "." "SimInst"] $page_title] # Loop over all workflow roles and add a character select widget for each -# set form [list] -# set character_options [simulation::get_object_options -content_type sim_character] -# foreach role_id [workflow::get_roles -workflow_id $workflow_id] { -# lappend form [list role_${role_id}:text(select) \ -# [list label [workflow::get_element -role_id $role_id -element pretty_name]] \ -# [list options $character_options] -# ] -# } +set form [list] +set character_options [simulation::get_object_options -content_type sim_character] +foreach role_id [workflow::get_roles -workflow_id $workflow_id] { + set role_short_name [workflow::role::get_element -role_id $role_id -element short_name] + set role_pretty_name [workflow::role::get_element -role_id $role_id -element pretty_name] + lappend form [list role_${role_short_name}:text(select) \ + [list label $role_pretty_name] \ + [list options $character_options] + ] +} -# ad_form -name characters -form $form +ad_form \ + -name characters \ + -export { workflow_id } \ + -form $form \ + -on_submit { + + db_transaction { + # Create a new template that is clone of the existing one + set workflow_id [simulation::template::clone -workflow_id $workflow_id] + + # Map each role to chosen character + foreach role_id [workflow::get_roles -workflow_id $workflow_id] { + set role_short_name [workflow::role::get_element -role_id $role_id -element short_name] + simulation::role::edit -role_id $role_id -character_id [set role_${role_short_name}] + } + } + + # Proceed to the task page + ad_returnredirect [export_vars -base map-tasks {workflow_id}] + ad_script_abort + } Index: openacs-4/packages/simulation/www/siminst/map-create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/map-create.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/siminst/map-create.adp 28 Nov 2003 16:55:52 -0000 1.1 @@ -0,0 +1,6 @@ +<master> + <property name="title">@page_title;noquote@</property> + <property name="context">@context;noquote@</property> + <property name="focus">template.pretty_name</property> + +<formtemplate id="template"></formtemplate> Index: openacs-4/packages/simulation/www/siminst/map-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/map-create.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/siminst/map-create.tcl 28 Nov 2003 16:55:52 -0000 1.1 @@ -0,0 +1,35 @@ +ad_page_contract { + A page that creates a mapped template by cloning a ready template. + This is the first step in the mapping process. + + @author Peter Marklund +} { + workflow_id:integer +} + +set page_title "Create mapped template" +set context [list [list "." "SimInst"] $page_title] + +set old_name [workflow::get_element -workflow_id $workflow_id -element pretty_name] +set name_default "$old_name Mapped" + +ad_form \ + -name template \ + -export { workflow_id } \ + -form { + {pretty_name:text + {label "Template name"} + {value $name_default} + {html {size 50}} + } + } -on_submit { + # Create a new template that is clone of the existing one + set workflow_id [simulation::template::clone \ + -workflow_id $workflow_id \ + -pretty_name $pretty_name] + + # Proceed to the task page + ad_returnredirect [export_vars -base map-tasks {workflow_id}] + ad_script_abort + + } Index: openacs-4/packages/simulation/www/siminst/map-tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/map-tasks.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/siminst/map-tasks.tcl 27 Nov 2003 16:43:36 -0000 1.1 +++ openacs-4/packages/simulation/www/siminst/map-tasks.tcl 28 Nov 2003 16:55:52 -0000 1.2 @@ -8,3 +8,4 @@ set page_title "Map to Tasks" set context [list [list "." "SimInst" ] $page_title] +