-
Notifications
You must be signed in to change notification settings - Fork 196
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
feat: send event when ora submission is created #2203
Merged
pomegranited
merged 6 commits into
openedx:master
from
eduNEXT:bav/add-created-submission-event
Apr 19, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ab302bf
feat: send event when ora submission is created
BryanttV 52a4471
chore: add openedx-events in base requirements
BryanttV 515a2a2
test: update unit test
BryanttV 8ea89ff
chore: address PR review
BryanttV 69b0051
chore: update event data
BryanttV a3c821b
chore: update openedx-events
BryanttV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change means we're throwing 2 "events" on ORA submission, this new one plus the legacy analytics event.
I'm a little worried that this will be confusing to people trying to consume these events, since you can't get everything you need from either event (this one has file urls but not the text answer, the analytics event has the text answer and other useful fields, but no file urls).
But I'm not sure how best to resolve this.. Any thoughts @BryanttV @mariajgrimaldi ?
Maybe instead of having your plugin re-fetch the submission in when it receives this new event, you could include all the extra submission data in the
ORASubmissionData
? Then we could say in a comment here thatORA_SUBMISSION_CREATED
should be used instead of the oldopenassessmentblock.create_submission
analytics event.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pomegranited: thank you for raising this!
Currently, these events are not interchangeable and they're used for different things. As far as I'm aware, we're not replacing one with the other, so the pattern of adding a new Open edX Event, even though there's already a tracking log event, repeats itself in a few places across the project.
That's why I don't find consuming one or the other confusing. However, that might change. So it doesn't make a lot of sense to send completely different data, making a transition from one to the other more difficult in the future. So, after discussing it with Bryann, we decided to:
So, the analytics event sends a subset of what the Open edX Event will send. I think that would make it easier in case of a transition or replacement.
@BryanttV, let us know if this sums up our conversation. @pomegranited: let us know what you think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds great thank you @mariajgrimaldi and @BryanttV !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I am on leave from 20 - 29 April, so if we need to merge this now to make the redwood cut, it's fine to make this data change part of a separate PR.
If that's the way you'd rather go, please let me know. You'll just need to resolve the conflicts after we merge #2204, and I can merge this first thing tomorrow (around 00:00 UTC).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll update this PR with the new data class today. We'll let you know how it goes before 00:00 UTC!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the idea is to merge this soon, we updated this PR with your latest suggestions @pomegranited. Now the data sent by the Open edX Event is a superset of what the legacy analytics event sends:
https://github.com/openedx/openedx-events/blob/main/openedx_events/learning/data.py#L450C1-L495C47
So, enough information is available for the events' users, and if, in the foreseeable future, the analytics event is replaced by this one, then the same data will be available.
Thank you, @BryanttV, for all the hard work! And to you, Jill, for the detailed review. Please, let us know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your changes look great, thank you! Will just run some quick manual tests and get this merged.