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

[DEPR]: lms/djangoapps/badges #33186

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/unit-test-shards.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"lms-1": {
"settings": "lms.envs.test",
"paths": [
"lms/djangoapps/badges/",
"lms/djangoapps/branding/",
"lms/djangoapps/bulk_email/",
"lms/djangoapps/bulk_enroll/",
Expand Down
5 changes: 0 additions & 5 deletions cms/djangoapps/models/settings/course_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@ def get_exclude_list_of_fields(cls, course_key):
exclude_list.append('enable_ccx')
exclude_list.append('ccx_connector')

# Do not show "Issue Open Badges" in Studio Advanced Settings
# if the feature is disabled.
if not settings.FEATURES.get('ENABLE_OPENBADGES'):
exclude_list.append('issue_badges')

# If the XBlockStudioConfiguration table is not being used, there is no need to
# display the "Allow Unsupported XBlocks" setting.
if not XBlockStudioConfigurationFlag.is_enabled():
Expand Down
3 changes: 0 additions & 3 deletions cms/envs/bok_choy.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@
# shown in Studio in a separate list.
FEATURES['ENABLE_SEPARATE_ARCHIVED_COURSES'] = True

# Enable support for OpenBadges accomplishments
FEATURES['ENABLE_OPENBADGES'] = True

# Enable partner support link in Studio footer
PARTNER_SUPPORT_EMAIL = 'partner-support@example.com'

Expand Down
3 changes: 0 additions & 3 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,6 @@
# Show video bumper in Studio
'ENABLE_VIDEO_BUMPER': False,

# Show issue open badges in Studio
'ENABLE_OPENBADGES': False,

# How many seconds to show the bumper again, default is 7 days:
'SHOW_BUMPER_PERIODICITY': 7 * 24 * 3600,

Expand Down
2 changes: 2 additions & 0 deletions common/djangoapps/util/tests/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from io import StringIO

import ddt
import unittest
from django.core.management import call_command
from django.db.transaction import TransactionManagementError, atomic
from django.test import TestCase, TransactionTestCase
Expand Down Expand Up @@ -120,6 +121,7 @@ class MigrationTests(TestCase):
Tests for migrations.
"""

@unittest.skip("Migration will delete several models. Need to ship not referencing it first")
@override_settings(MIGRATION_MODULES={})
def test_migrations_are_in_sync(self):
"""
Expand Down
177 changes: 0 additions & 177 deletions docs/lms-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,114 +58,6 @@ paths:
in: path
required: true
type: string
/badges/v1/assertions/user/{username}/:
get:
operationId: badges_v1_assertions_user_read
summary: '**Use Cases**'
description: |-
Request a list of assertions for a user, optionally constrained to a course.

**Example Requests**

GET /api/badges/v1/assertions/user/{username}/

**Response Values**

Body comprised of a list of objects with the following fields:

* badge_class: The badge class the assertion was awarded for. Represented as an object
with the following fields:
* slug: The identifier for the badge class
* issuing_component: The software component responsible for issuing this badge.
* display_name: The display name of the badge.
* course_id: The course key of the course this badge is scoped to, or null if it isn't scoped to a course.
* description: A description of the award and its significance.
* criteria: A description of what is needed to obtain this award.
* image_url: A URL to the icon image used to represent this award.
* image_url: The baked assertion image derived from the badge_class icon-- contains metadata about the award
in its headers.
* assertion_url: The URL to the OpenBadges BadgeAssertion object, for verification by compatible tools
and software.

**Params**

* slug (optional): The identifier for a particular badge class to filter by.
* issuing_component (optional): The issuing component for a particular badge class to filter by
(requires slug to have been specified, or this will be ignored.) If slug is provided and this is not,
assumes the issuing_component should be empty.
* course_id (optional): Returns assertions that were awarded as part of a particular course. If slug is
provided, and this field is not specified, assumes that the target badge has an empty course_id field.
'*' may be used to get all badges with the specified slug, issuing_component combination across all courses.

**Returns**

* 200 on success, with a list of Badge Assertion objects.
* 403 if a user who does not have permission to masquerade as
another user specifies a username other than their own.
* 404 if the specified user does not exist

{
"count": 7,
"previous": null,
"num_pages": 1,
"results": [
{
"badge_class": {
"slug": "special_award",
"issuing_component": "openedx__course",
"display_name": "Very Special Award",
"course_id": "course-v1:edX+DemoX+Demo_Course",
"description": "Awarded for people who did something incredibly special",
"criteria": "Do something incredibly special.",
"image": "http://example.com/media/badge_classes/badges/special_xdpqpBv_9FYOZwN.png"
},
"image_url": "http://badges.example.com/media/issued/cd75b69fc1c979fcc1697c8403da2bdf.png",
"assertion_url": "http://badges.example.com/public/assertions/07020647-e772-44dd-98b7-d13d34335ca6"
},
...
]
}
parameters:
- name: page
in: query
description: A page number within the paginated result set.
required: false
type: integer
- name: page_size
in: query
description: Number of results to return per page.
required: false
type: integer
responses:
'200':
description: ''
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
x-nullable: true
previous:
type: string
format: uri
x-nullable: true
results:
type: array
items:
$ref: '#/definitions/BadgeAssertion'
tags:
- badges
parameters:
- name: username
in: path
required: true
type: string
/bookmarks/v1/bookmarks/:
get:
operationId: bookmarks_v1_bookmarks_list
Expand Down Expand Up @@ -9477,75 +9369,6 @@ paths:
required: true
type: string
definitions:
BadgeClass:
required:
- slug
- display_name
- description
- criteria
type: object
properties:
slug:
title: Slug
type: string
format: slug
pattern: ^[-a-zA-Z0-9_]+$
maxLength: 255
minLength: 1
issuing_component:
title: Issuing component
type: string
format: slug
pattern: ^[-a-zA-Z0-9_]+$
default: ''
maxLength: 50
display_name:
title: Display name
type: string
maxLength: 255
minLength: 1
course_id:
title: Course id
type: string
maxLength: 255
description:
title: Description
type: string
minLength: 1
criteria:
title: Criteria
type: string
minLength: 1
image_url:
title: Image url
type: string
readOnly: true
format: uri
BadgeAssertion:
required:
- image_url
- assertion_url
type: object
properties:
badge_class:
$ref: '#/definitions/BadgeClass'
image_url:
title: Image url
type: string
format: uri
maxLength: 200
minLength: 1
assertion_url:
title: Assertion url
type: string
format: uri
maxLength: 200
minLength: 1
created:
title: Created
type: string
format: date-time
readOnly: true
CCXCourse:
required:
- master_course_id
Expand Down
1 change: 0 additions & 1 deletion docs/references/docstrings/lms_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Studio.
:maxdepth: 2

lms/modules
lms/djangoapps/badges/modules
lms/djangoapps/branding/modules
lms/djangoapps/bulk_email/modules
lms/djangoapps/courseware/modules
Expand Down
20 changes: 0 additions & 20 deletions lms/djangoapps/badges/admin.py

This file was deleted.

Empty file.
30 changes: 0 additions & 30 deletions lms/djangoapps/badges/api/serializers.py

This file was deleted.

Loading
Loading