forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Setup Badgr backend support v2 API and authentication for Juniper #94
Merged
ztraboo
merged 20 commits into
develop/juniper.master
from
feature.juniper/EW-528-Badgr-Backend-v2-API
Sep 18, 2020
Merged
Setup Badgr backend support v2 API and authentication for Juniper #94
ztraboo
merged 20 commits into
develop/juniper.master
from
feature.juniper/EW-528-Badgr-Backend-v2-API
Sep 18, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cache auth token til expiry then use refresh token to renew)
working assertion with v2 API (note requires using updated Ansible edxapp role or manual step to creat the db cache table)
backend slugs no longer generated from component and submitted slug because Badgr.io creates its own uuid-based slugs now BadgeClasses unique by slug, and also by course mode w/ course id Criteria passed to Badgr as criteria_text or criteria_url depending look up Badge Classes by slug if passed or if not by mode + id
instead to reject if course id, mode combo already exists ONLY IF course id is set... i.e., blank/null course id and mode dupes OK
migrations missing from: appsembler@cded392
(commented out some tests which should be reworked when BadgeClass slug and backend id are separated out. You can no longer set a Badgr id based on a hash of the BadgeClass slug. Badgr backend id is set by Badgr and returned in the response JSON. ) Fix badges tests, update to support Badgr API v1 and v2 (commented out some tests which should be reworked when BadgeClass slug and backend id are separated out. You can no longer set a Badgr id based on a hash of the BadgeClass slug. Badgr backend id is set by Badgr and returned in the response JSON. )
…-497 Following has changed: - Moved `BADGR_` settings after the `AUTH_TOKENS` file is read within the `production` env file. - Moved Badges cache values after `private` env file has been read for `production` env file. - `SessionAuthenticationAllowInactiveUser` has moved to https://github.com/edx/edx-drf-extensions - Setup the Open edX BadgeClass `slug` to have default random value of 22 alphanumeric characters prefixed with `edx_` to help it standout from Badgr BadgeClass entityID which updates it automatically when the Badgr BadgeClass is created. This prevents us from having to manually create a BadgeClass with defined `slug` value in the Django admin page everytime a course is created. - Setup the BadgeClass `clean()` to check for records > 1 to avoid duplicates. Previously it used `exists()` QuerySet to make this determination, however, it appears that even before the `.save()` call the new object gets stored in the QuerySet and therefore it exists without the save. - Added `openedx__course` BadgeClass `issuing_component` to the `course_complete` code.
…ug for testing. EW-528
33 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's important to note the creation of the badges cache table. Currently this is a manual step for devstack but setup with configuration for production.
Details:
appsembler#343
To create the database cache table, a task was added to the edxapp Ansible role, so this PR relies on a merge of appsembler/configuration#212 at least to automate setup. You can also just manually run ./manage.py lms createcachetable --settings=devstack_appsembler etc.