Index: openacs-4/packages/imsld/sql/postgresql/imsld-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/sql/postgresql/imsld-create.sql,v diff -u -r1.12 -r1.13 --- openacs-4/packages/imsld/sql/postgresql/imsld-create.sql 30 Jan 2006 19:31:05 -0000 1.12 +++ openacs-4/packages/imsld/sql/postgresql/imsld-create.sql 29 Mar 2006 15:55:24 -0000 1.13 @@ -8,7 +8,7 @@ \i imsld-level-a-create.sql \i imsld-cp-create.sql -\i imsld-status-create.sql +\i imsld-production-delivery-create.sql \i imsld-tree-create.sql \i imsld-level-b-create.sql \ No newline at end of file Index: openacs-4/packages/imsld/sql/postgresql/imsld-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/sql/postgresql/imsld-drop.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/imsld/sql/postgresql/imsld-drop.sql 30 Jan 2006 19:31:05 -0000 1.7 +++ openacs-4/packages/imsld/sql/postgresql/imsld-drop.sql 29 Mar 2006 15:55:24 -0000 1.8 @@ -11,6 +11,6 @@ \i imsld-cp-drop.sql -\i imsld-status-drop.sql +\i imsld-production-delivery-drop.sql \i imsld-level-b-drop.sql \ No newline at end of file Index: openacs-4/packages/imsld/sql/postgresql/imsld-level-b-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/sql/postgresql/imsld-level-b-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/imsld/sql/postgresql/imsld-level-b-create.sql 17 Mar 2006 15:02:03 -0000 1.2 +++ openacs-4/packages/imsld/sql/postgresql/imsld-level-b-create.sql 29 Mar 2006 15:55:24 -0000 1.3 @@ -78,7 +78,7 @@ comment on table imsld_restrictions is ' Restrictions of the properties. Defined in the IMS-LD spec'; -create table imsld_property_values ( +create table imsld_properties_values ( property_value_id integer constraint imsld_propv_id_fk references cr_revisions @@ -95,10 +95,10 @@ references cr_items, --imsld_expressions property_value_ref integer constraint imsld_prop_ref_fk - references cr_items --imsld_property_values + references cr_items --imsld_properties_values ); -comment on table imsld_property_values is ' +comment on table imsld_properties_values is ' Table used to store the values of the properties for the ''when_property_value_is set'' and ''change_property_value''.'; create table imsld_monitor_services ( @@ -143,7 +143,7 @@ not null, expression_id integer constraint imsld_then_cpv_fk - references cr_items --imsld_property_values + references cr_items --imsld_properties_values not null ); @@ -157,7 +157,7 @@ alter table imsld_send_mail_services add column username_property_id integer constraint imsld_unameprop_fk references cr_items; --imsld_properties alter table imsld_complete_acts add column time_property_id integer constraint imsld_compa_timepropv_fk references cr_items; --imsld_properties -alter table imsld_complete_acts add column when_prop_val_is_set_id integer constraint imsld_compa_wpvis_fk references cr_items; --imsld_property_values +alter table imsld_complete_acts add column when_prop_val_is_set_id integer constraint imsld_compa_wpvis_fk references cr_items; --imsld_properties_values alter table imsld_complete_acts add column when_condition_true_id integer constraint imsld_compa_whencondt_fk references cr_items; --imsld_properties @@ -233,7 +233,7 @@ -- references cr_items, --imsld_roles -- calculate_id integer -- constraint imsld_exp_calc_fk --- references cr_items, --imsld_property_values +-- references cr_items, --imsld_properties_values -- exp_one_id integer -- constraint imsld_exp_one_fk -- references cr_items, --imsld_expressions @@ -286,7 +286,7 @@ -- default 'f', -- change_prop_val_id integer -- constraint imsld_then_cpv_fk --- references cr_items --imsld_property_values +-- references cr_items --imsld_properties_values --); --create index imsld_then_ref_idx on imsld_then_model(ref_id); Index: openacs-4/packages/imsld/sql/postgresql/imsld-production-delivery-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/sql/postgresql/imsld-production-delivery-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/imsld/sql/postgresql/imsld-production-delivery-create.sql 29 Mar 2006 15:55:24 -0000 1.1 @@ -0,0 +1,76 @@ +-- +-- IMS-LD Status Data Model. +-- Theese tables are used to determine the status of the learner, staff or any other "IMS-LD object" +-- inside the unit of learning. +-- +-- @author jopez@inv.it.uc3m.es +-- @creation-date sept-2005 +-- + +create table imsld_status_user ( + imsld_id integer + constraint imsld_stat_imsldid_fk + references imsld_imslds + not null, + play_id integer + constraint imsld_stat_pl_fk + references imsld_plays, + act_id integer + constraint imsld_stat_act_fk + references imsld_acts, + role_part_id integer + constraint imsld_stat_rp_fk + references imsld_role_parts, + related_id integer + constraint imsld_stat_aid_fk + references cr_revisions -- reference to a learning_activity OR support_activity OR + not null, -- activity_structure OR environment OR role_part OR act OR play + user_id integer + constraint imsld_stat_user_fk + references users + not null, + role_id integer + constraint imsld_stat_role_fk + references cr_revisions, -- imsld_roles (not implemented, add not null then) + type varchar(20) + check (type in ('learning','support','structure','act','role-part','play','method','resource')), + status_date timestamptz + default current_timestamp + not null, + status varchar(20) + check (status in ('started','finished')), + constraint imsld_status_un + unique (related_id,user_id,status) +); + +create index imsld_stat_imsld_idx on imsld_status_user(imsld_id); +create index imsld_stat_rp_idx on imsld_status_user(role_part_id); +create index imsld_stat_comp_idx on imsld_status_user(related_id); +create index imsld_stat_user_idx on imsld_status_user(user_id); + +comment on table imsld_status_user is ' +This table holds the status of each user in the run of the unit of learning. +Each entry in this table says that the user referenced by user_id(role_id) has already started or completed the event referenced by _id. Extra information like the imsld_id, play_id, etc. is stored as cache purposes.'; + +create table imsld_property_instances ( + instance_id integer + constraint imsld_pin_fk + references cr_revisions + on delete cascade + constraint imsld_pin_pk + primary key, + property_id integer + constraint imsld_pin_pro_fk + references imsld_properties --since this table will only be used during run time, and because + not null, --of performance issues, the reference is directly to the imsld_properties table + party_id integer + references parties, --for the property of type loc, locpers, locrole orpst globpers + value varchar(4000) +); + +create index imsld_prop_pin_pro_idx on imsld_property_instances(property_id); +create index imsld_prop_pin_party_idx on imsld_property_instances(party_id); + +comment on table imsld_property_instances is ' +This table holds the property instance values of the unit of learning. +The property may refer to a role (role instance, which is a group) or a single user, using the party_id field.'; Index: openacs-4/packages/imsld/sql/postgresql/imsld-production-delivery-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/sql/postgresql/imsld-production-delivery-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/imsld/sql/postgresql/imsld-production-delivery-drop.sql 29 Mar 2006 15:55:24 -0000 1.1 @@ -0,0 +1,9 @@ +-- +-- IMS-LD Status Data Model Drop +-- +-- @author jopez@inv.it.uc3m.es +-- @creation-date sept-2005 +-- + +drop table imsld_status_user cascade; + Fisheye: Tag 1.11 refers to a dead (removed) revision in file `openacs-4/packages/imsld/sql/postgresql/imsld-status-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/imsld/sql/postgresql/imsld-status-drop.sql'. Fisheye: No comparison available. Pass `N' to diff?