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

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

Open
wants to merge 11 commits into
base: pearson-release/juniper.stage
Choose a base branch
from

Conversation

kuipumu
Copy link

@kuipumu kuipumu commented Nov 1, 2022

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
Copy link

alexjmpb commented Nov 1, 2022

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

@kuipumu
Copy link
Author

kuipumu commented Nov 2, 2022

@alexjmpb I added an initial plan for the roadmap

docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated Show resolved Hide resolved
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.

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
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

docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated Show resolved Hide resolved
docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated Show resolved Hide resolved
docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated Show resolved Hide resolved
docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated Show resolved Hide resolved
docs/decisions/0005-lti-provider-1.3-spec-support.rst Outdated Show resolved Hide resolved
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).

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.

Copy link
Author

@kuipumu kuipumu Nov 16, 2022

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

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

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.

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