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

[BUG FIX] [MER-4231] LTI course sections are incorrectly automatically created #5410

Conversation

eliknebel
Copy link
Contributor

@eliknebel eliknebel commented Feb 12, 2025

https://eliterate.atlassian.net/browse/MER-4231

Fixes an issue related to the LTI launch issue where the system was using the wrong LTIParams for a user, resulting in a previous/incorrect section being loaded.

The underlying issue here is that the relationship for user LTI params was specified as a has_one, however a user can have multiple associated params records. It seems that by preloading the LTI params, we had no control over which record is loaded (I assume it is the first one returned ordered by the database id, which would result in the first/oldest section a user ever launched into).

The fix here updates the relationship to be more accurately specified as a has_many and adds a function to load the latest LTI launch params ordered by the updated_at field, which are then used to locate the section.

@eliknebel eliknebel changed the title [BUG FIX] [MER-4231] LTI course sections are incorrectly automatically created minimal [BUG FIX] [MER-4231] LTI course sections are incorrectly automatically created (Part 1) Feb 12, 2025
@eliknebel eliknebel changed the title [BUG FIX] [MER-4231] LTI course sections are incorrectly automatically created (Part 1) [BUG FIX] [MER-4231] LTI course sections are incorrectly automatically created Feb 12, 2025
@rgachuhi rgachuhi merged commit adaf5d7 into master Feb 13, 2025
9 checks passed
@rgachuhi rgachuhi deleted the MER-4231-LTI-course-sections-are-incorrectly-automatically-created-minimal branch February 13, 2025 17:37
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