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

Get D2L API ID on user service #7016

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

marcospri
Copy link
Member

@marcospri marcospri commented Feb 12, 2025

We already have a mechanism to get this ID from roster data.

Extend it to be usable directly on user service and reuse the same method in RosterService.

Testing

  • Clear you DB's users, in make shell:

truncate lms_user CASCADE;

Launch two LTI1.3 assignments as any user, in D2L and Canvas

select display_name, lms_api_user_id from lms_user;
     display_name     | lms_api_user_id 
----------------------+-----------------
 Marcos Prieto        | 362
 DISPLAY NAME TEACHER | 36
(2 rows)
  • Truncate the lms_user table again:

truncate lms_user CASCADE;

@@ -654,16 +654,6 @@ def _get_course_users(self, lms_course: LMSCourse) -> dict[str, LMSUser]:
).all()
return {u.lms_api_user_id: u for u in users}

def _get_lms_api_user_id(self, member: Member, family: Family) -> str | None:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to UserService

We already have a mechanism to get this ID from roster data.
Extend it to be usable directly on user service and reuse the same method
in RosterService.
@marcospri marcospri force-pushed the d2l-api-id-user-service branch from b19010f to 47bd6da Compare February 12, 2025 14:19
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.

1 participant