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: emit passing status updated events for badging #34749

Conversation

GlugovGrGlib
Copy link
Member

Description

This PR introduces emission of the COURSE_PASSING_STATUS_UPDATED as well as CCX_COURSE_PASSING_STATUS_UPDATED events, that are groundwork for the new Credly integration and the future badging initiative.

Product GH ticket for tracking - openedx/platform-roadmap#280

Supporting information

Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

  • Configure Redis stream or Kafka event bus
  • Set settings.FEATURES['BADGES_ENABLED'] to True
  • Configure grading in a course
  • Pass the course with testing user
  • Observe generated COURSE_PASSING_STATUS_UPDATED events
  • Change grading for this course in a studio
  • Observe generated COURSE_PASSING_STATUS_UPDATED events

(The same should work for CCX courses)

Please refer to openedx-events PR for more information on the events itself: openedx/openedx-events#303

Deadline

Redwood

Other information

This PR is the replacement for the #34524

@openedx-webhooks
Copy link

Thanks for the pull request, @GlugovGrGlib! 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 May 9, 2024
@GlugovGrGlib
Copy link
Member Author

@mariajgrimaldi Kindly ask you to review this edx-platform PR if possible before the Redwood cut, as it mostly just adding new events under a feature flag and updating openedx-events version.

Copy link
Member

@mariajgrimaldi mariajgrimaldi left a comment

Choose a reason for hiding this comment

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

@GlugovGrGlib: Thanks for the ping.

The tests are failing, could you fix them? Also, could we remove the pylint disable statements from the test files?

Thanks.

@GlugovGrGlib GlugovGrGlib force-pushed the glugovgrglib/emit_passing_status_events_for_badging branch from 24462fe to 4cd9a56 Compare May 9, 2024 13:37
Copy link
Member

@mariajgrimaldi mariajgrimaldi left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you! I'll try merging this once tests pass.

@GlugovGrGlib
Copy link
Member Author

@mariajgrimaldi Thank you!

cms/envs/common.py Outdated Show resolved Hide resolved
Copy link
Contributor

@justinhynes justinhynes left a comment

Choose a reason for hiding this comment

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

I don't know as much about the use-case, but from the event bus functionality -- this seems good to me!

@mariajgrimaldi mariajgrimaldi merged commit 4599e45 into openedx:master May 9, 2024
79 of 80 checks passed
@openedx-webhooks
Copy link

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

Copy link
Contributor

@robrap robrap left a comment

Choose a reason for hiding this comment

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

I'm not trying to block this merged PR, but just adding some additional thoughts and questions. Thanks.

#### Event bus producing ####

def _should_send_learning_badge_events(settings):
return settings.FEATURES['BADGES_ENABLED']
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Will this toggle be used for anything other than _should_send_learning_badge_events? It seems like the toggle name could be much more descriptive, because this seems like there is a whole new feature that might be enabled/disabled.
  2. Is there any relationship with the badges DEPR: [DEPR]: lms/djangoapps/badges #31541? If not, you can see how a toggle named FEATURES['BADGES_ENABLED'] would confuse me to thinking there would be.

Copy link
Member

Choose a reason for hiding this comment

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

@robrap: thank you for raising this.

@GlugovGrGlib: Could you help us out here? If anything needs to be changed, we can do it in a follow-up PR and backport it to Redwood.

Copy link
Member

@mariajgrimaldi mariajgrimaldi May 9, 2024

Choose a reason for hiding this comment

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

@GlugovGrGlib: Since the redwood branch is now created off https://github.com/openedx/edx-platform/tree/2u/release, these changes didn't make it in time. So, if this needs to land in redwood, we still need to open a PR against open-release/redwood.master.

Copy link
Member Author

Choose a reason for hiding this comment

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

@robrap

  1. This is the first phase of the badging initiative outlined in the Credly integration platform-roadmap#280, which is expected to include additional milestones in the future. These potential milestones may encompass issuing badges for various achievements such as passing parts of the courses, and displaying claimed badges alongside courseware. The intention is to avoid embedding specific badging logic directly within the edx-platform. Instead, the plan is to emit generic events in the LMS or CMS, which can then be consumed and processed by the credentials IDA.

  2. From a product perspective, this feature represents a relaunch of the legacy open badges functionality, which was deprecated last year. Although it serves similar use cases, the current solution centralizes all processing logic within the credentials IDA. Additionally, future plans include support for multiple badging services beyond Credly, such as Accredible or others. Using a generic name like BADGES_ENABLED can ease the adoption of the feature across different community releases. With each release, users won't need to reconfigure LMS to use new functionality introduced in future milestones. At the same time, the primary configuration for processing remains within the credentials IDA.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mariajgrimaldi sure will do, thanks

UserPersonalData
)
from openedx_events.learning.signals import (
CCX_COURSE_PASSING_STATUS_UPDATED,
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't know anyone else was using CCX. I wonder when and if CCX documentation could be improved? I don't know where its docs live. It would be great if there were even a README in lms/djangoapps/ccx.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

@GlugovGrGlib GlugovGrGlib May 9, 2024

Choose a reason for hiding this comment

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

There are two major Open edX operators in the community that are heavily relying on CCX courses up to these days, Pearson and Campus. As per my knowledge, all the CCX functionality is still operable and compatible with learning MFE.
It would be good to have an additional initiative to document CCXs, as suggested. Maybe somebody from the community would be interested in maintaining lms/djangoapps/ccx app until there's an alternative for content reuse.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

rayzhou-bit pushed a commit that referenced this pull request May 9, 2024
Introduce emission of the COURSE_PASSING_STATUS_UPDATED as well as CCX_COURSE_PASSING_STATUS_UPDATED events, that are groundwork for the new Credly integration and the future badging initiative.

Product GH ticket for tracking - openedx/platform-roadmap#280
GlugovGrGlib added a commit to raccoongang/edx-platform that referenced this pull request May 15, 2024
Introduce emission of the COURSE_PASSING_STATUS_UPDATED as well as CCX_COURSE_PASSING_STATUS_UPDATED events, that are groundwork for the new Credly integration and the future badging initiative.

Product GH ticket for tracking - openedx/platform-roadmap#280
mariajgrimaldi pushed a commit that referenced this pull request May 27, 2024
Introduce emission of the COURSE_PASSING_STATUS_UPDATED as well as CCX_COURSE_PASSING_STATUS_UPDATED events, that are groundwork for the new Credly integration and the future badging initiative.

Product GH ticket for tracking - openedx/platform-roadmap#280
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.

10 participants