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 course enrollment sink #64

Merged
merged 3 commits into from
Jun 20, 2024
Merged

feat: add course enrollment sink #64

merged 3 commits into from
Jun 20, 2024

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Jun 17, 2024

Description

This PR creates a sink for the Course Enrollment mode. It uses the ENROLL_STATUS_CHANGE signal to listen for changes in enrollments.

Testing instructions

  1. Check out this branch on your local repository.
  2. Run Aspects migrations to create the necessary table.
  3. Enable the course enrollment sink waffle flag event_sink_clickhouse.course_enrollment.enabled.
  4. Enroll/unenroll in a course via the courseware page or in the instructor dashboard.
  5. Verify a record is stored for the enrollment.
  6. Verify the dump_data_to_clickhouse can dump old data.

Merge checklist:
Check off if complete or not applicable:

  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

@openedx-webhooks
Copy link

openedx-webhooks commented Jun 17, 2024

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 Jun 17, 2024
Copy link

github-actions bot commented Jun 17, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  platform_plugin_aspects
  __init__.py
  signals.py
  platform_plugin_aspects/sinks
  __init__.py
  course_enrollment_sink.py
  serializers.py 208
Project Total  

This report was generated by python-coverage-comment-action

@Ian2012 Ian2012 force-pushed the cag/enrollment-sink branch 4 times, most recently from 7cdafc2 to 74d814b Compare June 17, 2024 21:24
@Ian2012 Ian2012 force-pushed the cag/enrollment-sink branch from f30febd to 9f4cd69 Compare June 17, 2024 21:37
@Ian2012 Ian2012 marked this pull request as ready for review June 17, 2024 21:37
@Ian2012 Ian2012 force-pushed the cag/enrollment-sink branch 3 times, most recently from a083899 to 452c966 Compare June 17, 2024 21:45
@Ian2012 Ian2012 force-pushed the cag/enrollment-sink branch from 452c966 to 3e788ff Compare June 17, 2024 21:45
@saraburns1
Copy link
Contributor

@Ian2012 - i enrolled/unenrolled and also ran the dump to clickhouse. It looks like the ID values are not unique, is that expected?

Also, it doesn't seem to differentiate between enroll and unenroll, do we need that info?
image

@Ian2012
Copy link
Contributor Author

Ian2012 commented Jun 20, 2024

@saraburns1 Yes, the IDs correspond to the record on the DB and it's expected to be duplicated. We will create an MV that stores the last records per learner per course and their status. Tracking logs will be available for historical records. This will only be used to backfill data from the enrollments and know their last state. I think we can calculate enroll/unenroll with the is_active key

@Ian2012 Ian2012 merged commit 8275ee6 into main Jun 20, 2024
10 checks passed
@Ian2012 Ian2012 deleted the cag/enrollment-sink branch June 20, 2024 18:19
@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