Repository navigation
feat: add generic XBlock LTI grade passback event - #540
luisfelipec95 wants to merge 2 commits into
Conversation
|
Thanks for the pull request, @luisfelipec95! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
|
Hi @luisfelipec95! Is this pull request still in progress? |
Hi @mphilbrick211! Yes, it’s still in progress. The discussion to determine whether we should move forward with this PR is happening here: |
d628b8c to
c8fd1f1
Compare
| # .. event_data: LtiGradePassbackData | ||
| # .. event_trigger_repository: openedx/xblock-lti-consumer | ||
| XBLOCK_LTI_GRADE_PASSBACK = OpenEdxPublicSignal( | ||
| event_type="org.openedx.content_authoring.xblock.lti.grade.passback.v1", |
There was a problem hiding this comment.
This is a learner's grade reported while the course is running, so it belongs in the learning subdomain rather than content_authoring, next to the other grade events like EXTERNAL_GRADER_SCORE_SUBMITTED. Move the data class and the signal to openedx_events/learning/ and make the type org.openedx.learning.xblock.lti.grade.passback.v1.
| lti_version (str): LTI protocol version source (e.g. "1.1", "1.3"). | ||
| """ | ||
| user_id = attr.ib(type=int) | ||
| anonymous_user_id = attr.ib(type=str) |
There was a problem hiding this comment.
What does the consumer need anonymous_user_id for? Sending it next to user_id gives anyone reading the event bus the mapping between the two, which is what the anonymous id is meant to avoid. If the consumer only needs to identify the learner inside Open edX, user_id is enough and we can drop this one. If we only need a consistent ID for the user, then we should only pass the anonymous_id.
| usage_key = attr.ib(type=UsageKey) | ||
| score = attr.ib(type=float) | ||
| max_score = attr.ib(type=float) | ||
| lti_version = attr.ib(type=str) |
There was a problem hiding this comment.
Document the exact values this can take, eg. "1.1" and "1.3", so consumers don't have to guess at the format.
Summary
This PR introduces a new public event for LTI grade passback from XBlock integrations, generalized to support both LTI 1.1 and 1.3 use cases.
Instead of a 1.1-only signal, this change defines a generic event contract that includes a version discriminator (
lti_version) and common grading context fields.What changed
LtiGradePassbackDatadata model.openedx_events/content_authoring/signals.py:event_name:XBLOCK_LTI_GRADE_PASSBACKevent_type:org.openedx.content_authoring.xblock.lti.grade.passback.v1event_key_field:lti_grade_passback.usage_keyevent_trigger_repository:openedx/xblock-lti-consumerEvent payload
lti_grade_passback(LtiGradePassbackData) includes:user_idanonymous_user_idcourse_keyusage_keyscoremax_scorelti_version(e.g."1.1"/"1.3")Motivation
Issue discussion highlighted that the existing generic external grader event is currently oriented to xqueue metadata and does not carry the LTI-specific source/context required for this flow.
This PR provides a clear and extensible contract for LTI grade passback while avoiding a 1.1-only event design.
Related links