Index: openacs-4/contrib/packages/simulation/sql/postgresql/simulation-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/sql/postgresql/Attic/simulation-tables-create.sql,v diff -u -r1.25 -r1.26 --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-tables-create.sql 10 Mar 2004 12:29:42 -0000 1.25 +++ openacs-4/contrib/packages/simulation/sql/postgresql/simulation-tables-create.sql 11 Mar 2004 12:13:41 -0000 1.26 @@ -23,7 +23,12 @@ case_end timestamptz, send_start_note_date timestamptz, constraint sim_simulations_case_end_after_start_ck - check (case_end >= case_start) + check (case_end >= case_start), + show_contacts_p boolean default 't' + constraint sim_show_contacts_p_ck + check(show_contacts_p in ('t','f')) + constraint sim_show_contacts_p_nn + not null ); select acs_object_type__create_type ( 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.15 -r1.16 --- openacs-4/contrib/packages/simulation/www/siminst/map-characters.tcl 22 Jan 2004 14:08:39 -0000 1.15 +++ openacs-4/contrib/packages/simulation/www/siminst/map-characters.tcl 11 Mar 2004 12:13:40 -0000 1.16 @@ -46,6 +46,12 @@ ]] } +ad_form -extend -name characters -form { + {show_contacts_p:boolean(radio),optional + {label "Should we these contacts?"} + {options {{"Show contacts" t} {"Don't show contacts" f}}} + } +} wizard submit characters -buttons { back next } @@ -56,13 +62,22 @@ simulation::role::get -role_id $role_id -array sim_role_array set role_$role_id $sim_role_array(character_id) } + set show_contacts_p [db_string gettheflag { + select show_contacts_p + from sim_simulations + where simulation_id=:workflow_id}] } -on_submit { db_transaction { # Map each role to chosen character foreach role_id [workflow::get_roles -workflow_id $workflow_id] { set row(character_id) [set role_${role_id}] simulation::role::edit -role_id $role_id -array row } + db_dml show_contacts_p { + update sim_simulations + set show_contacts_p = :show_contacts_p + where simulation_id = :workflow_id + } } simulation::template::flush_inst_state -workflow_id $workflow_id Index: openacs-4/contrib/packages/simulation/www/simplay/control-bar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/control-bar.adp,v diff -u -r1.15 -r1.16 --- openacs-4/contrib/packages/simulation/www/simplay/control-bar.adp 30 Jan 2004 12:13:37 -0000 1.15 +++ openacs-4/contrib/packages/simulation/www/simplay/control-bar.adp 11 Mar 2004 12:13:40 -0000 1.16 @@ -16,11 +16,13 @@
  • About this simulation
  • My Notifications +

    Contacts

    +
    Index: openacs-4/contrib/packages/simulation/www/simplay/control-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/control-bar.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/contrib/packages/simulation/www/simplay/control-bar.tcl 26 Jan 2004 15:23:38 -0000 1.14 +++ openacs-4/contrib/packages/simulation/www/simplay/control-bar.tcl 11 Mar 2004 12:13:40 -0000 1.15 @@ -15,6 +15,11 @@ set workflow_id [simulation::case::get_element -case_id $case_id -element workflow_id] +set show_contacts_p [db_string getflag { + select show_contacts_p + from sim_simulations + where simulation_id=:workflow_id}] + set case_home_url [export_vars -base "case" { case_id role_id }] set message_count [db_string message_count_sql { Index: openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql,v diff -u -r1.25 -r1.26 --- openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql 10 Mar 2004 12:29:42 -0000 1.25 +++ openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql 11 Mar 2004 12:13:41 -0000 1.26 @@ -23,7 +23,12 @@ case_end timestamptz, send_start_note_date timestamptz, constraint sim_simulations_case_end_after_start_ck - check (case_end >= case_start) + check (case_end >= case_start), + show_contacts_p boolean default 't' + constraint sim_show_contacts_p_ck + check(show_contacts_p in ('t','f')) + constraint sim_show_contacts_p_nn + not null ); select acs_object_type__create_type ( 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.15 -r1.16 --- openacs-4/packages/simulation/www/siminst/map-characters.tcl 22 Jan 2004 14:08:39 -0000 1.15 +++ openacs-4/packages/simulation/www/siminst/map-characters.tcl 11 Mar 2004 12:13:40 -0000 1.16 @@ -46,6 +46,12 @@ ]] } +ad_form -extend -name characters -form { + {show_contacts_p:boolean(radio),optional + {label "Should we these contacts?"} + {options {{"Show contacts" t} {"Don't show contacts" f}}} + } +} wizard submit characters -buttons { back next } @@ -56,13 +62,22 @@ simulation::role::get -role_id $role_id -array sim_role_array set role_$role_id $sim_role_array(character_id) } + set show_contacts_p [db_string gettheflag { + select show_contacts_p + from sim_simulations + where simulation_id=:workflow_id}] } -on_submit { db_transaction { # Map each role to chosen character foreach role_id [workflow::get_roles -workflow_id $workflow_id] { set row(character_id) [set role_${role_id}] simulation::role::edit -role_id $role_id -array row } + db_dml show_contacts_p { + update sim_simulations + set show_contacts_p = :show_contacts_p + where simulation_id = :workflow_id + } } simulation::template::flush_inst_state -workflow_id $workflow_id Index: openacs-4/packages/simulation/www/simplay/control-bar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/control-bar.adp,v diff -u -r1.15 -r1.16 --- openacs-4/packages/simulation/www/simplay/control-bar.adp 30 Jan 2004 12:13:37 -0000 1.15 +++ openacs-4/packages/simulation/www/simplay/control-bar.adp 11 Mar 2004 12:13:40 -0000 1.16 @@ -16,11 +16,13 @@
  • About this simulation
  • My Notifications +

    Contacts

    +
    Index: openacs-4/packages/simulation/www/simplay/control-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/control-bar.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/simulation/www/simplay/control-bar.tcl 26 Jan 2004 15:23:38 -0000 1.14 +++ openacs-4/packages/simulation/www/simplay/control-bar.tcl 11 Mar 2004 12:13:40 -0000 1.15 @@ -15,6 +15,11 @@ set workflow_id [simulation::case::get_element -case_id $case_id -element workflow_id] +set show_contacts_p [db_string getflag { + select show_contacts_p + from sim_simulations + where simulation_id=:workflow_id}] + set case_home_url [export_vars -base "case" { case_id role_id }] set message_count [db_string message_count_sql {