hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
46 stars 14 forks source link

Backfill LMSSegment (groups) #6853

Closed marcospri closed 1 week ago

marcospri commented 1 week ago

For:

Testing

https://hypothesis.instructure.com/courses/125/assignments/1833

select * from lms_segment where type = 'canvas_group';
 id  |     type     | lms_id |              name               |         h_authority_provided_id          | lms_course_id | lms_group_set_id |          created           |          updated
-----+--------------+--------+---------------------------------+------------------------------------------+---------------+------------------+----------------------------+---------------------------
 173 | canvas_group | 130    | Group with student              | 102a25279bc609179f58cb4bf5c50d7dfc6f0929 |           105 |              123 | 2024-11-12 09:55:04.993776 | 2024-11-13 09:55:39.94171
 174 | canvas_group | 610    | Group created after course copy | 28b6d0a2ce206db35ef53624cb9fc66d5835fadd |           105 |              123 | 2024-11-12 09:55:04.993776 | 2024-11-13 09:55:39.94171
 175 | canvas_group | 132    | Test group                      | 381c455de84ae2f6d2fc84142f4e898b29d748f3 |           105 |              123 | 2024-11-12 09:55:04.993776 | 2024-11-13 09:55:39.94171
 178 | canvas_group | 131    | Another test group              | e8c66a347a5f547ae87928d4e92e5045908f8d54 |           105 |              123 | 2024-11-12 09:55:04.993776 | 2024-11-13 09:55:39.94171
(4 rows)

truncate lms_segment cascade;

tox -e dev --run-command 'alembic upgrade head'

select * from lms_segment where type = 'canvas_group';
 id  |     type     | lms_id |              name               |         h_authority_provided_id          | lms_course_id | lms_group_set_id |          created           |          updated
-----+--------------+--------+---------------------------------+------------------------------------------+---------------+------------------+----------------------------+---------------------------
 180 | canvas_group | 130    | Group with student              | 102a25279bc609179f58cb4bf5c50d7dfc6f0929 |           105 |              123 | 2024-11-12 09:55:04.993776 | 2024-11-13 09:55:39.94171
 181 | canvas_group | 610    | Group created after course copy | 28b6d0a2ce206db35ef53624cb9fc66d5835fadd |           105 |              123 | 2024-11-12 09:55:04.993776 | 2024-11-13 09:55:39.94171
 182 | canvas_group | 132    | Test group                      | 381c455de84ae2f6d2fc84142f4e898b29d748f3 |           105 |              123 | 2024-11-12 09:55:04.993776 | 2024-11-13 09:55:39.94171
 185 | canvas_group | 131    | Another test group              | e8c66a347a5f547ae87928d4e92e5045908f8d54 |           105 |              123 | 2024-11-12 09:55:04.993776 | 2024-11-13 09:55:39.94171
(4 rows)