This Django app integrates Open Badges support into Open edX using a Badgr-compatible badge server. It handles badge class creation, awarding badges, and managing badge assertions automatically in response to platform events like enrollments and certificate generation.
- Integrates Open edX with a Badgr-compatible badge server
- Automatically creates badge classes for courses when needed
- Awards badges when learners complete courses and certificates are issued
- Tracks awarded badges locally
- Provides an API endpoint to fetch user badge assertions
- Add this app to your Open edX environment (mounted app or installed package)
- Add it to
INSTALLED_APPS - Add the
issue_badgesfield toCourseFields - Configure the required Badgr settings (see below)
- Run migrations for the models
issue_badges = Boolean(
display_name=_("Issue Open Badges"),
help=_(
"Issue Open Badges badges for this course. Badges are generated when certificates are created."
),
scope=Scope.settings,
default=True
)This field enables per-course control over badge issuance. Without it, badges are enabled for all courses by default, and the feature cannot be toggled at the course level via Advanced Settings.
Configure the following (typically in common.py) to connect to your
badge server:
BADGR_USERNAME– Badge server usernameBADGR_PASSWORD– Badge server passwordBADGR_TOKENS_CACHE_KEY– Cache key for access tokenBADGR_ISSUER_SLUG– Issuer slug on the badge serverBADGR_BASE_URL– Base URL of the badge server API (for example:https://api.badgr.io)
These settings allow the app to authenticate and manage badges on your server.
The app introduces models for tracking badges:
- BadgeClass – Defines badges per course and mode
- BadgeAssertion – Tracks badges awarded to users
- CourseCompleteImageConfiguration – Configures badge images per course mode
- CourseEventBadgesConfiguration – Supports event-based or meta badges
Migrations must be run to create these models.
- Endpoint:
/assertions/user/<username>/ - Purpose: Retrieve all badge assertions for a user
- Requires a Badgr-compatible server with correct issuer permissions
- Access tokens are cached
- Badge creation and awarding are automated
This app provides a streamlined, event-driven badging system for Open edX with full course-level control.
If you're having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community.
Our real-time conversations are on Slack. You can request a Slack invitation, then join our community Slack workspace.
For anything non-trivial, the best path is to open an issue in this repository with as many details about the issue you are facing as you can provide:
https://github.com/edly-io/openedx-badges/issues
For more information about these options, see the Getting Help page.
The code in this repository is licensed under the Apache Software License 2.0 unless otherwise noted.
Please see LICENSE.txt for details.
Contributions are very welcome. Please read How To Contribute for details.
This project is currently accepting all types of contributions, including bug fixes, security fixes, maintenance work, and new features. However, please make sure to have a discussion about your new feature idea with the maintainers prior to beginning development to maximize the chances of your change being accepted.
You can start a conversation by creating a new issue on this repo summarizing your idea.
All community members are expected to follow the Open edX Code of Conduct.
The assigned maintainers for this component and other project details may
be found in Backstage. Backstage pulls this data from the
catalog-info.yaml file in this repo.
Please do not report security issues in public. Please email security@openedx.org.