Skip to content

PADV-228: Add LTI 1.3 support to the LTI Provider app - #85

Open
kuipumu wants to merge 11 commits into
pearson-release/juniper.stagefrom
vue/PADV-228
Open

kuipumu wants to merge 11 commits into
pearson-release/juniper.stagefrom
vue/PADV-228

Conversation

@kuipumu

@kuipumu kuipumu commented Nov 1, 2022 •

Copy link
Copy Markdown

Ticket

https://agile-jira.pearson.com/browse/PADV-228

Description

Currently, the Open edX platform can work as an LTI 1.1 tool provider, for XBlocks on any course. LTI 1.1 has been deprecated since 2019, the current specification, LTI 1.3 is only supported on the platform for Content Libraries V2 content.

This PR add the LTI 1.3 discovery documentation to update the LTI 1.1 tool provider app to include support for LTI 1.3.

Type of Change

  • Add LTI 1.3 support to the LTI Provider app discovery document

Reviewers

@alexjmpb

alexjmpb commented Nov 1, 2022

Copy link
Copy Markdown

Part of the acceptance criteria is to create a roadmap of the required work, is that included here?

@kuipumu

kuipumu commented Nov 2, 2022

Copy link
Copy Markdown
Author

@alexjmpb I added an initial plan for the roadmap

Comment thread docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated
Comment on lines +29 to +32
- **Platform (Tool Provider)**: LMS or any kind of platform that needs
to delegate bits of functionality out to a suite of tools.
- **Tool (Tool Consumer)**: The external application or service
providing functionality to the platform is called a tool.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What do you think about providing a more comprehensive explanation using examples like in this article https://www.imsglobal.org/basic-overview-how-lti-works?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

What do you think about adding it to the references?, some terminologies are not found in this LTI 1.1 overview

Comment thread docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated
Comment thread docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated
Comment thread docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated
Comment thread docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated
Comment thread docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated
Co-authored-by: AlexJMP <62396424+alexjmpb@users.noreply.github.com>
Comment on lines +229 to +232
# Get all assignments involving the current problem for which the campus LMS
# is expecting a grade. There may be many possible graded assignments, if
# a problem has been added several times to a course at different
# granularities (such as the unit or the vertical).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I know the documentation for get_assignments_for_problem implies that a single problem can exist multiple times in a course, and at different granularities, but I'm pretty sure that's not true. If you copy a problem component you end up with a new problem component with its own block id (usage_key). So multiple copies of a problem can certainly be made, and located either in the same assignment/subsection (but why would you do this unless using cohort or track-based differentiated content), or in multiple assignments, but in either case they will each be a distinct problem instance. I don't believe (happy to be proven wrong!) that get _assignment_for_problem should return more than one assignment.
Confusing I know but Open edX uses both 'unit' and 'vertical' to mean the same thing.
Also, content only exists at the vertical/unit level. You can't add content blocks of any type at any other level, at least not from Studio. Attempting to do so by manipulating the OLX does kinda work in that Studio will load the file and try to represent it, but on publish the LMS renders the component under an existing subsection.

@kuipumu kuipumu Nov 16, 2022 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think get_assignments_for_problem was made because PROBLEM_WEIGHTED_SCORE_CHANGED describes in its source code that it's only sent on problem score changes:

# Signal that indicates that a user's weighted score for a problem has been updated.
# This signal is generated when a scoring event occurs in the Submissions module
# or a PROBLEM_RAW_SCORE_CHANGED event is handled in the core platform.

That means that in order to update outcomes for LTI 1.1 launches made for vertical components, the receiver will need to catch the score changes on vertical components from its children, currently, get_assignments_for_problem does that by tracing the parent hierarchy of a given problem:

locations = []
current_descriptor = problem_descriptor
while current_descriptor:
    locations.append(current_descriptor.location)
    current_descriptor = current_descriptor.get_parent()
assignments = GradedAssignment.objects.filter(
    user=user_id, course_key=course_key, usage_key__in=locations
)
return assignments

Now, right now I'm not sure what's the behavior of PROBLEM_WEIGHTED_SCORE_CHANGED signal, this signal only translates the information sent from the score_set signal defined in submission.models, score_set signal is described as always informing any score change from any item:

# Signal to inform listeners that a score has been changed
score_set = Signal(providing_args=[
    'points_possible', 'points_earned', 'anonymous_user_id',
    'course_id', 'item_id', 'created_at'
])

If that's the case, then you are right that there should be one LTI assignment to be caught (or more if there is another GradedAssignment for the same user, course_key, usage_key with another lis_result_sourcedid and/or OutcomeService) on score_set or PROBLEM_WEIGHTED_SCORE_CHANGED signal for a given user_id, course_key, and usage_key.

I will look at this in further detail since there are more details I'm missing from how the platform handles grading.

https://discuss.openedx.org/t/a-question-about-lti-provider-support-in-open-edx/4866/2
- Open edX Slack LTI channel:
https://openedx.slack.com/archives/C0GR05YC

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Given how this would fit in a new app, is it possible to make that APP live in an openedx-plugin?


In this approach, we will require to import a few classes and functions
from edx-platform, for example, the User model to keep track of users on
LTI launches the PROBLEM_WEIGHTED_SCORE_CHANGED signal to receive the

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The signal part can be done using an openedx-event. Now, the user model is a bit trickier. There are things we can do with the configurable backends pattern to avoid the import, but we would still be tying the underlying implementation of the model to the plugin.

This branch has not been deployed

No deployments
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.

5 participants