-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Allow xAPI processor to emit multiple statements per tracking log Updates the event processor change to allow for the possibility that some event transformers may generate multiple events from a single event, and these events need to be carried down the processor chain. This is necessary to handle multi-question problem check events, which previously only transformed the first question into xAPI and dropped the rest. * refactor: applies functional programming principles to event transformation This reduces the side-effects of event transformation, which will allow us to re-use base event transformation methods when generating multiple events from a single source event. * Removes the BaseTransformerMixin.transformed_event instance variable in favor of passing an event through to base_transform() to be modified and returned. * Adds BaseTransformerMixin.get_object() so that caliper events don't need to reference self.transformed_event when updating the object data. * Adds BaseTransformerMixin.get_extensions() so that caliper events can don't have to hack in their transformerVersion during BaseTransformerMixin.transform() * feat: multi-question problem_check events produce multiple xAPI events Single-question problem_check events still only produce one xAPI event. Changes to the top-level multi-question problem_check event data: * object.type changed from Activity to GroupActivity * object.id shows the base problem usage_key * object.definition.interaction_type is "other" New events emitted for each child problem are identical the top-level event, except for: * object.type is Activity * object.id shows the base problem usage_key including the child usage string * object.definition.interaction_type is determined by the child problem response_type * result.score is omitted -- only relevant to the parent problem * result.response is provided, pulled from the child question submission * result.success is provided, pulled from the child question submission Related fixes to all problem_check events: * object.definition.name now shows the problem display_name * object.id now uses shows the problem usage_key * result.score max and raw are now always provided if present in the source event (bug fix) * stops mocking uuid5 during tests uuid5 generates the same UUID when provided with the same namespace + name, and so we can rely on this remaining the same in the expected fixture files. * updates test data to use the actual uuid5s generated for the given input events. * fix: child events must use unique event IDs * pulls event ID generation into get_event_id(), taking care not to modify how parent event IDs are generated. * overrides get_event_id() for child events by using the child_id as part of the UUID namespace_key. * updates tests to check that child events and their parent event use different event IDs, and the affected problem_check multiple-question test data * fix: rebase, add newly added event types --------- Co-authored-by: Jillian Vogel <[email protected]>
- Loading branch information
1 parent
9ccfee1
commit 99ede4e
Showing
99 changed files
with
1,861 additions
and
212 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,7 @@ omit = | |
*admin.py | ||
*static* | ||
*templates* | ||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
raise NotImplementedError |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
Various backends for receiving edX LMS events.. | ||
""" | ||
|
||
__version__ = '6.2.0' | ||
__version__ = '7.0.0' |
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
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.