Skip to content

Commit 0b3e4d7

Browse files
feat!: Removed Badges App
fix: restored badges handlers feat: remove FE code for badges fix: resolved failing tests fix: removed test case for badges app fix: unused import error fix: Response Field Count fix: shareable account response length fix: resolved PR comments fix: revert settings override feat!: Removed Badges App fix: restored badges handlers feat: remove FE code for badges fix: resolved failing tests fix: removed test case for badges app fix: unused import error fix: Response Field Count fix: shareable account response length fix: revert subscription badge
1 parent 92731be commit 0b3e4d7

File tree

72 files changed

+17
-3860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+17
-3860
lines changed

Diff for: .github/workflows/unit-test-shards.json

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"lms-1": {
33
"settings": "lms.envs.test",
44
"paths": [
5-
"lms/djangoapps/badges/",
65
"lms/djangoapps/branding/",
76
"lms/djangoapps/bulk_email/",
87
"lms/djangoapps/bulk_enroll/",

Diff for: cms/djangoapps/models/settings/course_metadata.py

-5
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,6 @@ def get_exclude_list_of_fields(cls, course_key):
126126
exclude_list.append('enable_ccx')
127127
exclude_list.append('ccx_connector')
128128

129-
# Do not show "Issue Open Badges" in Studio Advanced Settings
130-
# if the feature is disabled.
131-
if not settings.FEATURES.get('ENABLE_OPENBADGES'):
132-
exclude_list.append('issue_badges')
133-
134129
# If the XBlockStudioConfiguration table is not being used, there is no need to
135130
# display the "Allow Unsupported XBlocks" setting.
136131
if not XBlockStudioConfigurationFlag.is_enabled():

Diff for: cms/envs/bok_choy.py

-3
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@
123123
# shown in Studio in a separate list.
124124
FEATURES['ENABLE_SEPARATE_ARCHIVED_COURSES'] = True
125125

126-
# Enable support for OpenBadges accomplishments
127-
FEATURES['ENABLE_OPENBADGES'] = True
128-
129126
# Enable partner support link in Studio footer
130127
PARTNER_SUPPORT_EMAIL = '[email protected]'
131128

Diff for: cms/envs/common.py

-3
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,6 @@
321321
# Show video bumper in Studio
322322
'ENABLE_VIDEO_BUMPER': False,
323323

324-
# Show issue open badges in Studio
325-
'ENABLE_OPENBADGES': False,
326-
327324
# How many seconds to show the bumper again, default is 7 days:
328325
'SHOW_BUMPER_PERIODICITY': 7 * 24 * 3600,
329326

Diff for: common/djangoapps/util/tests/test_db.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from io import StringIO
44

55
import ddt
6+
import unittest
67
from django.core.management import call_command
78
from django.db.transaction import TransactionManagementError, atomic
89
from django.test import TestCase, TransactionTestCase
@@ -120,6 +121,7 @@ class MigrationTests(TestCase):
120121
Tests for migrations.
121122
"""
122123

124+
@unittest.skip("Migration will delete several models. Need to ship not referencing it first")
123125
@override_settings(MIGRATION_MODULES={})
124126
def test_migrations_are_in_sync(self):
125127
"""

Diff for: docs/lms-openapi.yaml

-177
Original file line numberDiff line numberDiff line change
@@ -58,114 +58,6 @@ paths:
5858
in: path
5959
required: true
6060
type: string
61-
/badges/v1/assertions/user/{username}/:
62-
get:
63-
operationId: badges_v1_assertions_user_read
64-
summary: '**Use Cases**'
65-
description: |-
66-
Request a list of assertions for a user, optionally constrained to a course.
67-
68-
**Example Requests**
69-
70-
GET /api/badges/v1/assertions/user/{username}/
71-
72-
**Response Values**
73-
74-
Body comprised of a list of objects with the following fields:
75-
76-
* badge_class: The badge class the assertion was awarded for. Represented as an object
77-
with the following fields:
78-
* slug: The identifier for the badge class
79-
* issuing_component: The software component responsible for issuing this badge.
80-
* display_name: The display name of the badge.
81-
* course_id: The course key of the course this badge is scoped to, or null if it isn't scoped to a course.
82-
* description: A description of the award and its significance.
83-
* criteria: A description of what is needed to obtain this award.
84-
* image_url: A URL to the icon image used to represent this award.
85-
* image_url: The baked assertion image derived from the badge_class icon-- contains metadata about the award
86-
in its headers.
87-
* assertion_url: The URL to the OpenBadges BadgeAssertion object, for verification by compatible tools
88-
and software.
89-
90-
**Params**
91-
92-
* slug (optional): The identifier for a particular badge class to filter by.
93-
* issuing_component (optional): The issuing component for a particular badge class to filter by
94-
(requires slug to have been specified, or this will be ignored.) If slug is provided and this is not,
95-
assumes the issuing_component should be empty.
96-
* course_id (optional): Returns assertions that were awarded as part of a particular course. If slug is
97-
provided, and this field is not specified, assumes that the target badge has an empty course_id field.
98-
'*' may be used to get all badges with the specified slug, issuing_component combination across all courses.
99-
100-
**Returns**
101-
102-
* 200 on success, with a list of Badge Assertion objects.
103-
* 403 if a user who does not have permission to masquerade as
104-
another user specifies a username other than their own.
105-
* 404 if the specified user does not exist
106-
107-
{
108-
"count": 7,
109-
"previous": null,
110-
"num_pages": 1,
111-
"results": [
112-
{
113-
"badge_class": {
114-
"slug": "special_award",
115-
"issuing_component": "openedx__course",
116-
"display_name": "Very Special Award",
117-
"course_id": "course-v1:edX+DemoX+Demo_Course",
118-
"description": "Awarded for people who did something incredibly special",
119-
"criteria": "Do something incredibly special.",
120-
"image": "http://example.com/media/badge_classes/badges/special_xdpqpBv_9FYOZwN.png"
121-
},
122-
"image_url": "http://badges.example.com/media/issued/cd75b69fc1c979fcc1697c8403da2bdf.png",
123-
"assertion_url": "http://badges.example.com/public/assertions/07020647-e772-44dd-98b7-d13d34335ca6"
124-
},
125-
...
126-
]
127-
}
128-
parameters:
129-
- name: page
130-
in: query
131-
description: A page number within the paginated result set.
132-
required: false
133-
type: integer
134-
- name: page_size
135-
in: query
136-
description: Number of results to return per page.
137-
required: false
138-
type: integer
139-
responses:
140-
'200':
141-
description: ''
142-
schema:
143-
required:
144-
- count
145-
- results
146-
type: object
147-
properties:
148-
count:
149-
type: integer
150-
next:
151-
type: string
152-
format: uri
153-
x-nullable: true
154-
previous:
155-
type: string
156-
format: uri
157-
x-nullable: true
158-
results:
159-
type: array
160-
items:
161-
$ref: '#/definitions/BadgeAssertion'
162-
tags:
163-
- badges
164-
parameters:
165-
- name: username
166-
in: path
167-
required: true
168-
type: string
16961
/bookmarks/v1/bookmarks/:
17062
get:
17163
operationId: bookmarks_v1_bookmarks_list
@@ -9477,75 +9369,6 @@ paths:
94779369
required: true
94789370
type: string
94799371
definitions:
9480-
BadgeClass:
9481-
required:
9482-
- slug
9483-
- display_name
9484-
- description
9485-
- criteria
9486-
type: object
9487-
properties:
9488-
slug:
9489-
title: Slug
9490-
type: string
9491-
format: slug
9492-
pattern: ^[-a-zA-Z0-9_]+$
9493-
maxLength: 255
9494-
minLength: 1
9495-
issuing_component:
9496-
title: Issuing component
9497-
type: string
9498-
format: slug
9499-
pattern: ^[-a-zA-Z0-9_]+$
9500-
default: ''
9501-
maxLength: 50
9502-
display_name:
9503-
title: Display name
9504-
type: string
9505-
maxLength: 255
9506-
minLength: 1
9507-
course_id:
9508-
title: Course id
9509-
type: string
9510-
maxLength: 255
9511-
description:
9512-
title: Description
9513-
type: string
9514-
minLength: 1
9515-
criteria:
9516-
title: Criteria
9517-
type: string
9518-
minLength: 1
9519-
image_url:
9520-
title: Image url
9521-
type: string
9522-
readOnly: true
9523-
format: uri
9524-
BadgeAssertion:
9525-
required:
9526-
- image_url
9527-
- assertion_url
9528-
type: object
9529-
properties:
9530-
badge_class:
9531-
$ref: '#/definitions/BadgeClass'
9532-
image_url:
9533-
title: Image url
9534-
type: string
9535-
format: uri
9536-
maxLength: 200
9537-
minLength: 1
9538-
assertion_url:
9539-
title: Assertion url
9540-
type: string
9541-
format: uri
9542-
maxLength: 200
9543-
minLength: 1
9544-
created:
9545-
title: Created
9546-
type: string
9547-
format: date-time
9548-
readOnly: true
95499372
CCXCourse:
95509373
required:
95519374
- master_course_id

Diff for: docs/references/docstrings/lms_index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Studio.
99
:maxdepth: 2
1010

1111
lms/modules
12-
lms/djangoapps/badges/modules
1312
lms/djangoapps/branding/modules
1413
lms/djangoapps/bulk_email/modules
1514
lms/djangoapps/courseware/modules

Diff for: lms/djangoapps/badges/admin.py

-20
This file was deleted.

Diff for: lms/djangoapps/badges/api/__init__.py

Whitespace-only changes.

Diff for: lms/djangoapps/badges/api/serializers.py

-30
This file was deleted.

0 commit comments

Comments
 (0)