Badgr integration updates (#27181)
* Badgr integration fix Badges are no longer created on the Badgr side with a given 'slug'. Instead, a slug(v1) or an entityId(v2) will be generated for each badge on the Badgr side and we will need to use that value to check if a certain badge matching a BadgeClass on our side exists and/or to create assertions for it. This commit introduces a new field to the badgeclass: 'badgr_server_slug' by cherry-picking the following commit from 3309aab2a2eb00d28c5ca3d3145c8dddb15e6159 - TTK-18543: fix Badgr Server connection (https://github.com/teltek/edx-platform/pull/46 ) This commit also modifies the cherry-picked commit by making the newly added field optional since the BadgeClass is not neccessarily always used with the Badgr backend. Co-authored-by:mrey <mrey@teltek.es> * Implement OAuth2 tokens flow for BadgrBackend * Use Badgr v2 API Co-authored-by:
mrey <mrey@teltek.es>
Showing
- lms/djangoapps/badges/backends/badgr.py 155 additions, 24 deletionslms/djangoapps/badges/backends/badgr.py
- lms/djangoapps/badges/backends/tests/test_badgr_backend.py 126 additions, 24 deletionslms/djangoapps/badges/backends/tests/test_badgr_backend.py
- lms/djangoapps/badges/migrations/0004_badgeclass_badgr_server_slug.py 19 additions, 0 deletions...ps/badges/migrations/0004_badgeclass_badgr_server_slug.py
- lms/djangoapps/badges/models.py 1 addition, 0 deletionslms/djangoapps/badges/models.py
- lms/djangoapps/badges/tests/factories.py 1 addition, 0 deletionslms/djangoapps/badges/tests/factories.py
- lms/djangoapps/badges/tests/test_models.py 5 additions, 1 deletionlms/djangoapps/badges/tests/test_models.py
- lms/envs/common.py 23 additions, 7 deletionslms/envs/common.py
Loading
Please register or sign in to comment