Conversation
johanseto
left a comment
There was a problem hiding this comment.
I am not sure or is not under my scope. But how are loaded the json test current and expected data.
I saw something similar in this file
but I dont now if there is somehting like to fixtures or someone else is testing these jsons.
Mainly the current jsons are not inside xapi level
https://github.com/nelc/event-routing-backends/pull/6/files#diff-d5842e91648b041fe5ecf8caed70496a53e778d476b9561a494065980f1c4850
I thinks that is similar to this line
but variable is like
EXCEPTED_EVENTS_FIXTURES_PATH. And EXCEPTED that is different that tthe expected folder?/
| Returns: | ||
| `Activity` | ||
| """ | ||
| if not self.object_type: |
There was a problem hiding this comment.
This could raise multple 500? when object_type is not defined. Is it possible?
There was a problem hiding this comment.
this works like an abstract class, if someone use this instead of one of the sub-classes will get the errors that you mentioned
| """ | ||
| Transformer for events generated when a user completes a section, subsection or unit. | ||
| """ | ||
| object_type = constants.XAPI_ACTIVITY_MODULE |
There was a problem hiding this comment.
Intesresting that module encompasses section, subsection or unit
There was a problem hiding this comment.
Based on the nelc requirements this should be module they doesn't make any differences between unit section and sub-sections
| return Result( | ||
| completion=self.get_data("data.completion") == 1.0, | ||
| extensions=Extensions( | ||
| {constants.XAPI_ACTIVITY_PROGRESS: self.get_data("data.completion") * 100} |
There was a problem hiding this comment.
So here you need the progress beetween [0, 100]
There was a problem hiding this comment.
I just moved the transformer from the completion file to the progress file I didn't design any logic here
original class
Description:
This implements multiple transformers for events that I'm proposing in this PR
Progress events, those will be emitted when the block has not reached the 100% of completion
edx.completion_aggregator.progress.courseedx.completion_aggregator.progress.chapteredx.completion_aggregator.progress.sequentialedx.completion_aggregator.progress.verticalCompletion events, those will be emitted when the block has reached the 100% of completion
edx.completion_aggregator.completion.courseedx.completion_aggregator.completion.chapteredx.completion_aggregator.completion.sequentialedx.completion_aggregator.completion.verticalAnd basically I'm proposing this since the current "completion" implementation doesn't cover completion events and that has the same limitation as the edx-completion plugin, that only works with unit components
JIRA: Link to JIRA ticket
Dependencies: dependencies on other outstanding PRs, issues, etc.
Merge deadline: List merge deadline (if any)
Installation instructions: List any non-trivial installation
instructions.
Testing instructions:
Merge checklist:
Post merge:
finished.
Author concerns: List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.