Index: openacs-4/packages/imsld/sql/postgresql/imsld-status-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/sql/postgresql/Attic/imsld-status-create.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/imsld/sql/postgresql/imsld-status-create.sql	30 Jan 2006 12:00:45 -0000	1.8
+++ openacs-4/packages/imsld/sql/postgresql/imsld-status-create.sql	8 Feb 2006 17:37:59 -0000	1.9
@@ -15,35 +15,40 @@
     play_id                 integer
                             constraint imsld_stat_pl_fk  
                             references imsld_plays,
-    act_id                 integer
+    act_id                  integer
                             constraint imsld_stat_act_fk  
                             references imsld_acts,
     role_part_id            integer
                             constraint imsld_stat_rp_fk  
                             references imsld_role_parts,
-    completed_id            integer
+    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')),
-    finished_date           timestamptz
+    status_date             timestamptz
                             default current_timestamp
                             not null,
+    status                  varchar(20)
+                            check (status in ('started','finished')),
     constraint imsld_status_un
-    unique (completed_id,user_id)
+    unique (related_id,user_id)
 );
 
 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(completed_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 unit of learning.
-Each entry in this table says that the user referenced by user_id has already COMPLETED the role part referenced by role_part_id, so if we want to know what role part is the next one for any user, we have to see the las completed role part and find out which one is next.';
+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 in order to avoid wasting of time.';
 
