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.1 -r1.2 --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-tables-create.sql 14 Oct 2003 13:58:03 -0000 1.1 +++ openacs-4/contrib/packages/simulation/sql/postgresql/simulation-tables-create.sql 27 Oct 2003 12:41:24 -0000 1.2 @@ -19,7 +19,7 @@ constraint sim_roles_pk primary key, character_id integer constraint sim_roles_character_fk - check (1=1) + references cr_items ); comment on table sim_roles is 'Each record is a role within a simulation template to be played by one or more users or a computer agent when the template is instantiated into cases.'; Index: openacs-4/contrib/packages/simulation/www/object-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/Attic/object-edit.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/contrib/packages/simulation/www/object-edit.tcl 27 Oct 2003 12:22:58 -0000 1.9 +++ openacs-4/contrib/packages/simulation/www/object-edit.tcl 27 Oct 2003 12:41:24 -0000 1.10 @@ -295,7 +295,6 @@ if { $content_type == "sim_stylesheet" } { set mime_type "text/css" } - set revision_id [bcms::revision::add_revision \ -item_id $item_id \ Index: openacs-4/contrib/packages/simulation/www/sim-template-roles.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/Attic/sim-template-roles.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/sim-template-roles.tcl 27 Oct 2003 07:42:48 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/sim-template-roles.tcl 27 Oct 2003 12:41:24 -0000 1.2 @@ -31,7 +31,7 @@ name { label "Name" } - character { + char_name { label "Character" link_url_col char_url } @@ -43,22 +43,21 @@ } } } - +#------------------------------------------------------------- +# roles db_multirow +#------------------------------------------------------------- # TODO: fix this so it returns rows when it should db_multirow -extend { edit_url char_url delete_url } roles select_roles " select wr.role_id, wr.pretty_name as name, wr.sort_order, - cr.title as character, - i.name as char_name + ci.name as char_name from workflow_roles wr, sim_roles sr, - cr_revisions cr, - cr_items i + cr_items ci where wr.workflow_id = :workflow_id and sr.role_id = wr.role_id - and cr.item_id = sr.character_id - and i.item_id = sr.character_id + and ci.item_id = sr.character_id [template::list::orderby_clause -orderby -name "roles"] " { set edit_url [export_vars -base "role-edit" { role_id }] 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.1 -r1.2 --- openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql 14 Oct 2003 13:58:03 -0000 1.1 +++ openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql 27 Oct 2003 12:41:24 -0000 1.2 @@ -19,7 +19,7 @@ constraint sim_roles_pk primary key, character_id integer constraint sim_roles_character_fk - check (1=1) + references cr_items ); comment on table sim_roles is 'Each record is a role within a simulation template to be played by one or more users or a computer agent when the template is instantiated into cases.'; Index: openacs-4/packages/simulation/www/object-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/Attic/object-edit.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/simulation/www/object-edit.tcl 27 Oct 2003 12:22:58 -0000 1.9 +++ openacs-4/packages/simulation/www/object-edit.tcl 27 Oct 2003 12:41:24 -0000 1.10 @@ -295,7 +295,6 @@ if { $content_type == "sim_stylesheet" } { set mime_type "text/css" } - set revision_id [bcms::revision::add_revision \ -item_id $item_id \ Index: openacs-4/packages/simulation/www/sim-template-roles.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/Attic/sim-template-roles.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/sim-template-roles.tcl 27 Oct 2003 07:42:48 -0000 1.1 +++ openacs-4/packages/simulation/www/sim-template-roles.tcl 27 Oct 2003 12:41:24 -0000 1.2 @@ -31,7 +31,7 @@ name { label "Name" } - character { + char_name { label "Character" link_url_col char_url } @@ -43,22 +43,21 @@ } } } - +#------------------------------------------------------------- +# roles db_multirow +#------------------------------------------------------------- # TODO: fix this so it returns rows when it should db_multirow -extend { edit_url char_url delete_url } roles select_roles " select wr.role_id, wr.pretty_name as name, wr.sort_order, - cr.title as character, - i.name as char_name + ci.name as char_name from workflow_roles wr, sim_roles sr, - cr_revisions cr, - cr_items i + cr_items ci where wr.workflow_id = :workflow_id and sr.role_id = wr.role_id - and cr.item_id = sr.character_id - and i.item_id = sr.character_id + and ci.item_id = sr.character_id [template::list::orderby_clause -orderby -name "roles"] " { set edit_url [export_vars -base "role-edit" { role_id }]