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

feat: add xapi transformer for completion events #339

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Aug 22, 2023

Description: Adds an xAPI transformer for completion events

JIRA: Link to JIRA ticket

Dependencies: openedx/completion#245

Merge deadline: List merge deadline (if any)

Installation instructions: List any non-trivial installation
instructions.

Testing instructions:

  1. Open page A
  2. Do thing B
  3. Expect C to happen
  4. If D happened instead - check failed.

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPI after tag-triggered build is
    finished.

Author concerns: List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.

@openedx-webhooks
Copy link

openedx-webhooks commented Aug 22, 2023

Thanks for the pull request, @Ian2012! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 22, 2023
@Ian2012 Ian2012 force-pushed the cag/add-completion-events branch from 1425d0d to e32174e Compare August 22, 2023 20:53
@Ian2012 Ian2012 marked this pull request as ready for review August 23, 2023 15:40
@Ian2012 Ian2012 requested a review from ziafazal August 23, 2023 15:40
@Ian2012 Ian2012 force-pushed the cag/add-completion-events branch 2 times, most recently from 0fcec6a to 9ae82a6 Compare August 23, 2023 15:43
Copy link
Contributor

@ziafazal ziafazal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ian2012 overall looks good. Couple of things to take care of

  1. One things we need to do is change schema of xAPI statement and put progress under result instead of extensions of object.
  2. Documentation needs to added here and here

Comment on lines 12 to 24
"definition": {
"type": "http://id.tincanapi.com/activitytype/resource",
"extensions": { "https://w3id.org/xapi/cmi5/result/extensions/progress": 100.0 }
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definition of object should be like below and progress should be under result

"object": {
 "id": "http://localhost:18000/xblock/block-v1:edX+DemoX+Demo_Course+type@problem+block@7c54b16c8ed34f9f8772015178c7a175",
"objectType": "Activity",
"definition": {
      "type": "http://id.tincanapi.com/activitytype/resource"
    }
  },
  "result": {
    "extensions": {
      "https://w3id.org/xapi/cmi5/result/extensions/progress": 100.0
    }
  },

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I've updated the statement cc @bmtcril

@Ian2012 Ian2012 requested review from ziafazal and bmtcril August 24, 2023 17:54
@Ian2012 Ian2012 force-pushed the cag/add-completion-events branch from e2e93b2 to dea7fe4 Compare August 24, 2023 19:10
@ziafazal
Copy link
Contributor

@Ian2012 could you please update the documentation files to include new events?

Copy link
Contributor

@ziafazal ziafazal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bmtcril
Copy link
Contributor

bmtcril commented Aug 25, 2023

@Ian2012 should be good to go if you squash and bump the version

@Ian2012
Copy link
Contributor Author

Ian2012 commented Aug 25, 2023

I will, remember that this event is not approved yet in openedx/completion#245

@Ian2012 Ian2012 force-pushed the cag/add-completion-events branch 2 times, most recently from b1a0a24 to 3dd5b82 Compare August 25, 2023 16:10
@Ian2012 Ian2012 force-pushed the cag/add-completion-events branch 2 times, most recently from ee6aecf to 8f03d76 Compare September 7, 2023 21:52
@Ian2012 Ian2012 force-pushed the cag/add-completion-events branch from 8f03d76 to c66af5c Compare September 22, 2023 13:25
test: add fixtures for completion events

fix: use result to store completion status

docs: add documentation for block completion events
@Ian2012 Ian2012 force-pushed the cag/add-completion-events branch from c66af5c to 603f37e Compare September 22, 2023 13:32
@Ian2012 Ian2012 merged commit 9ccfee1 into master Sep 22, 2023
8 checks passed
@Ian2012 Ian2012 deleted the cag/add-completion-events branch September 22, 2023 13:34
@openedx-webhooks
Copy link

@Ian2012 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants