-
Notifications
You must be signed in to change notification settings - Fork 14
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
Keep the LMSUserAssignmentMembership table in sync with AssignmentMembership #6760
Conversation
f35b944
to
6d33459
Compare
c71f539
to
35c83f4
Compare
@@ -182,7 +185,11 @@ def get_assignment_for_launch(self, request, course: Course) -> Assignment | Non | |||
) | |||
|
|||
def upsert_assignment_membership( | |||
self, assignment: Assignment, user: User, lti_roles: list[LTIRole] | |||
self, | |||
lti_params: LTIParams, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New parameter to be able to pick up the new grading ID.
{ | ||
"lms_user": lms_user, | ||
"assignment": assignment, | ||
"lti_role": lti_role, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uppss, missing testing the grading ID test case, adding it now.
Done
a8fcdc5
to
193840f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and works as expected.
6d33459
to
034cefc
Compare
193840f
to
892dcd0
Compare
For:
This changes allow us store the LTI1.1 grading ID which is unique per assignment and user.
We do this in a new table that follows the LMSUser, LMSCourse, LMSCourseMebmership patterns. This will allows to find membership objects without having to worry about duplicated users.
Testing
https://hypothesis.instructure.com/courses/125/assignments/7777
https://hypothesis.instructure.com/courses/319/assignments/7296
Repeat the launches as a student for both assignments
Check the data from the DB, we'll have rows with for both thet studend and teacher, only with the lti_v11_lis_result_sourcedid on the LTI1.1 launch: