You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- All learner status rows use a shared lookup table (`oel_competency_mastery_statuses`) so status semantics live in one place and student status tables stay structurally consistent.
170
172
171
173
Intended update flow (bottom-up materialization):
172
174
@@ -175,26 +177,37 @@ Decision
175
177
- At each group, evaluate children in `ordering` sequence and short-circuit when the group's result is already determined by its `logic_operator`.
176
178
- Persist only rows whose status changed.
177
179
178
-
1. Add new database table for `student_competencycriteriastatus` with these columns:
180
+
1. Add new database table for `oel_competency_mastery_statuses` with these columns:
181
+
182
+
1. `id`: unique primary key
183
+
2. `status`: unique status value (seeded values: “Demonstrated”, “AttemptedNotDemonstrated”, and “PartiallyAttempted”)
184
+
185
+
Notes:
186
+
187
+
- This table is system-owned lookup data and should be treated as immutable configuration, not user-authored rows.
188
+
189
+
2. Add new database table for `student_competencycriteriastatus` with these columns:
179
190
180
191
1. `id`: unique primary key
181
192
2. `competency_criteria_id`: Foreign key to `CompetencyCriterion.id`
182
193
3. `user_id`: Foreign key pointing to user_id (presumably the learner's id, although it appears that it is possible for staff to get grades as well) in `auth_user` table
183
-
4. `status`: Enumeration of “Demonstrated”, “AttemptedNotDemonstrated”, and “PartiallyAttempted”. This field should be very small and not varchar(100) as it will be part of an index.
194
+
4. `status_id`: Foreign key to `oel_competency_mastery_statuses.id`
184
195
5. `created`: The timestamp at which the student's criterion status was set.
185
-
2. Add a new database table for `student_competencycriteriagroupstatus` with these columns:
196
+
197
+
3. Add a new database table for `student_competencycriteriagroupstatus` with these columns:
186
198
187
199
1. `id`: unique primary key
188
200
2. `competency_criteria_group_id`: Foreign key to `CompetencyCriteriaGroup.id`
189
201
3. `user_id`: Foreign key pointing to user_id (presumably the learner's id, although it appears that it is possible for staff to get grades as well) in `auth_user` table
190
-
4. `status`: Enumeration of “Demonstrated”, “AttemptedNotDemonstrated”, and “PartiallyAttempted”. This field should be very small and not varchar(100) as it will be part of an index.
202
+
4. `status_id`: Foreign key to `oel_competency_mastery_statuses.id`
191
203
5. `created`: The timestamp at which the student's criteria-group status was set.
192
-
3. Add a new database table for `student_competencystatus` with these columns:
204
+
205
+
4. Add a new database table for `student_competencystatus` with these columns:
193
206
194
207
1. `id`: unique primary key
195
208
2. `oel_tagging_tag_id`: Foreign key pointing to Tag id
196
209
3. `user_id`: Foreign key pointing to user_id (presumably the learner's id, although it appears that it is possible for staff to get grades as well) in `auth_user` table
197
-
4. `status`: Enumeration of “Demonstrated” and “PartiallyAttempted”. This field should be very small and not varchar(100) as it will be part of an index.
210
+
4. `status_id`: Foreign key to `oel_competency_mastery_statuses.id`. This table should have a constraint to only allow status values of “Demonstrated” and “PartiallyAttempted” since it represents overall competency demonstration state, not in-progress states.
198
211
5. `created`: The timestamp at which the student's competency status was set.
0 commit comments