Fix a couple of LTI issues. (hotfix of #3210) - #3211
Open
drgrice1 wants to merge 1 commit into
Open
Conversation
First, for both versions of LTI, there are several columns in the user table that should never be modified in the `maybe_update_user` methods. Those are the `displayMode`, `useMathQuill`, `useMathView`, and most importantly the `accommodation_time_factor` columns. However, since the `$tempUser` object is created without those ever initialized, these values get set to defaults in the database when an update does occur. The worst case here is that the `accommodation_time_factor` gets set back to 1 in the case that the instructor changed it. Second, when grades are passed back for a test and yet there are no test versions taken by the student, there was an error in the `WeBWorK::Authen::LTI::GradePassback::earliestGatewayDate` method that makes the return value incorrect, and as a result grades end up being passed back when they should not. Basically, the method should not only check that the `$setVersions` passed in is an array reference, but also that it is nonempty.
Member
Author
|
By the way, see https://forums.openwebwork.org/mod/forum/discuss.php?d=8836 for the first issue. The second issue is something I have been noticing for the last few weeks since starting to use LTI 1.3 in production. |
somiaj
approved these changes
Sep 11, 2026
somiaj
left a comment
Contributor
There was a problem hiding this comment.
I haven't noticed this issue, but I don't think any of my users change data often enough that I would have seen it. Code is easily understandable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First, for both versions of LTI, there are several columns in the user table that should never be modified in the
maybe_update_usermethods. Those are thedisplayMode,useMathQuill,useMathView, and most importantly theaccommodation_time_factorcolumns. However, since the$tempUserobject is created without those ever initialized, these values get set to defaults in the database when an update does occur. The worst case here is that theaccommodation_time_factorgets set back to 1 in the case that the instructor changed it.Second, when grades are passed back for a test and yet there are no test versions taken by the student, there was an error in the
WeBWorK::Authen::LTI::GradePassback::earliestGatewayDatemethod that makes the return value incorrect, and as a result grades end up being passed back when they should not. Basically, the method should not only check that the$setVersionspassed in is an array reference, but also that it is nonempty.