Fix for optional lineitem props being included in deep link return#170
Open
snake wants to merge 1 commit intopackbackbooks:masterfrom
Open
Fix for optional lineitem props being included in deep link return#170snake wants to merge 1 commit intopackbackbooks:masterfrom
snake wants to merge 1 commit intopackbackbooks:masterfrom
Conversation
…eturn as nulls These are optional, and should be omitted if not set, not sent as null.
snake
commented
Jan 28, 2026
| 'scoreMaximum' => $this->line_item->getScoreMaximum(), | ||
| 'label' => $this->line_item->getLabel(), | ||
| 'resourceId' => $this->line_item->getResourceId(), | ||
| 'tag' => $this->line_item->getTag(), |
Author
There was a problem hiding this comment.
Had a thought that we could probably just use $this->line_item->toArray() here, instead of manually assembling it. Happy to change patch if that's the direction you want to go.
Edit: thinking about this a bit more, that is probably not a good fit, given LtiLineItem represents the full set of props, whereas deep linking content items only include a subset.
AsiaH-dev
approved these changes
Feb 27, 2026
AsiaH-dev
left a comment
There was a problem hiding this comment.
This looks good to me! The changes look safe & reasonable. I tested them with our project and deep linking still works as expected.
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.
Summary of Changes
Fixes #169
Testing
Unit test coverage is included.
composer testbefore opening this PRcomposer lint-fixbefore opening this PR