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 grading events #341

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Aug 23, 2023

Description: Adds transformers for edx.grades.subsection.grade_calculated and edx.grades.course.grade_calculated events.

JIRA: (#331)

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:

  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.

@Ian2012 Ian2012 requested a review from ziafazal August 23, 2023 19:00
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 23, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Aug 23, 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.

@Ian2012 Ian2012 force-pushed the cag/add-grading-events branch 2 times, most recently from 4ad4c7b to 219b755 Compare August 23, 2023 21:44
@Ian2012
Copy link
Contributor Author

Ian2012 commented Aug 24, 2023

@ziafazal what do you think about the proposed schema? Do you think we need to change it?

@ziafazal
Copy link
Contributor

@ziafazal what do you think about the proposed schema? Do you think we need to change it?

@Ian2012 I think we need to change schema in these events too. We should add result in xAPI statements with grades

  "result": {
        "score": {
            "max": 1,
            "min": 0,
            "raw": 0,
            "scaled": 0
        },
        "success": false
    },

Result can be calculated same as here

@Ian2012 Ian2012 marked this pull request as ready for review August 24, 2023 19:07
@Ian2012 Ian2012 requested a review from bmtcril August 24, 2023 19:36
@Ian2012 Ian2012 linked an issue Aug 24, 2023 that may be closed by this pull request
Copy link
Contributor

@bmtcril bmtcril left a comment

Choose a reason for hiding this comment

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

Just one comment, otherwise lgtm

"min": 0.0,
"max": 1.0
},
"extensions": {}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should just be omitted if it's empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was fixed by setting a default value for empty letter_grade.

@Ian2012 Ian2012 force-pushed the cag/add-grading-events branch 5 times, most recently from b9deadd to 6c29381 Compare August 25, 2023 16:15
@Ian2012 Ian2012 requested a review from bmtcril August 25, 2023 16:16
test: add fixtures for grading events

fix: use classification for grading events

fix: use result to store subsection grade data

fix: use result to store course grade data

test: add fixtures for grade event for 0

fix: use default value for empty letter grade
Copy link
Contributor

@bmtcril bmtcril left a comment

Choose a reason for hiding this comment

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

LGTM

@Ian2012
Copy link
Contributor Author

Ian2012 commented Aug 28, 2023

cc @ziafazal

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 Ian2012 merged commit 5191224 into master Aug 29, 2023
6 checks passed
@Ian2012 Ian2012 deleted the cag/add-grading-events branch August 29, 2023 12:52
@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.

Feat: Support for grading events
4 participants