Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backfill LMSUser.lms_api_user_id from the assignment roster data #6879

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

marcospri
Copy link
Member

@marcospri marcospri commented Nov 28, 2024

For:

The LMSUser.lms_api_user_id now filled in #6878 is also vaiivialbe in assignments rosters in Canvas.

We'll read it from the roster info while fetching it to speed up the backfill.

Testing

  • Clear the DB to force roster fetching:

truncate task_done, assignment_roster;

  • Clear any IDs you might have in the DB

update lms_user set lms_api_user_id = null;

  • Launch a LTI1.3 assignment:

https://hypothesis.instructure.com/courses/319/assignments/3308

  • Schedule the roster fetching, make shell:
from lms.tasks.roster import schedule_fetching_rosters
schedule_fetching_rosters.delay()
  • Check that some users have been backfilled:
select display_name, lms_api_user_id from lms_user where lms_api_user_id is not null;
     display_name      | lms_api_user_id
-----------------------+-----------------
 DISPLAY NAME TEACHER  | 36
 Leopoldd              | 85
 eng+coursecopystudent | 255

@marcospri marcospri force-pushed the lms-user-api-id-code branch 3 times, most recently from 0de1f62 to 2b750a9 Compare November 29, 2024 10:22
@marcospri marcospri force-pushed the lms-user-api-id-from-roster branch from 8b21a87 to 4e6f855 Compare November 29, 2024 15:33
@marcospri marcospri marked this pull request as ready for review November 29, 2024 15:40
@marcospri marcospri force-pushed the lms-user-api-id-code branch from 2b750a9 to f1d1c69 Compare December 3, 2024 09:47
Base automatically changed from lms-user-api-id-code to main December 3, 2024 10:52
@marcospri marcospri force-pushed the lms-user-api-id-from-roster branch from 4e6f855 to fc24923 Compare December 3, 2024 12:44
@marcospri marcospri requested a review from acelaya December 3, 2024 12:45
@marcospri marcospri merged commit 226d707 into main Dec 3, 2024
9 checks passed
@marcospri marcospri deleted the lms-user-api-id-from-roster branch December 3, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants