learning-credentials 0.5.1rc4__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/CHANGELOG.rst +13 -0
- {learning_credentials-0.5.1rc4/learning_credentials.egg-info → learning_credentials-0.5.2}/PKG-INFO +14 -1
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/admin.py +3 -2
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/v1/views.py +8 -1
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/generators.py +1 -1
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/processors.py +5 -5
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2/learning_credentials.egg-info}/PKG-INFO +14 -1
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/pyproject.toml +1 -1
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/tests/test_generators.py +1 -1
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/LICENSE.txt +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/MANIFEST.in +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/README.rst +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/__init__.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/__init__.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/urls.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/v1/__init__.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/v1/permissions.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/v1/serializers.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/v1/urls.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/apps.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/compat.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/conf/locale/config.yaml +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/exceptions.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0001_initial.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0002_migrate_to_learning_credentials.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0003_rename_certificates_to_credentials.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0004_replace_course_keys_with_learning_context_keys.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0005_rename_processors_and_generators.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0006_cleanup_openedx_certificates_tables.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0007_migrate_to_text_elements_format.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0008_validation.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0009_credential_user_fk.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/0010_credential_configuration_fk.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/migrations/__init__.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/models.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/settings/__init__.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/settings/common.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/settings/production.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/tasks.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/templates/learning_credentials/base.html +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/body.html +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/body.txt +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/from_name.txt +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/head.html +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/subject.txt +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/urls.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials.egg-info/SOURCES.txt +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials.egg-info/dependency_links.txt +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials.egg-info/entry_points.txt +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials.egg-info/requires.txt +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials.egg-info/top_level.txt +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/setup.cfg +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/tests/test_admin.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/tests/test_migrations.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/tests/test_models.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/tests/test_processors.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/tests/test_tasks.py +0 -0
- {learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/tests/test_views.py +0 -0
|
@@ -16,6 +16,19 @@ Unreleased
|
|
|
16
16
|
|
|
17
17
|
*
|
|
18
18
|
|
|
19
|
+
0.5.2 - 2026-08-11
|
|
20
|
+
******************
|
|
21
|
+
|
|
22
|
+
Changed
|
|
23
|
+
=======
|
|
24
|
+
|
|
25
|
+
* The ``CredentialAdmin`` list view is now ordered by the ``created`` timestamp in descending order (most recent first).
|
|
26
|
+
|
|
27
|
+
Removed
|
|
28
|
+
=======
|
|
29
|
+
|
|
30
|
+
* ``CredentialAdmin`` and ``CredentialConfigurationAdmin`` list views no longer allow filtering by the ``learning_context_key``.
|
|
31
|
+
|
|
19
32
|
0.5.1 - 2026-03-17
|
|
20
33
|
******************
|
|
21
34
|
|
{learning_credentials-0.5.1rc4/learning_credentials.egg-info → learning_credentials-0.5.2}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: learning-credentials
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: A pluggable service for preparing Open edX credentials.
|
|
5
5
|
Author-email: OpenCraft <help@opencraft.com>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -177,6 +177,19 @@ Unreleased
|
|
|
177
177
|
|
|
178
178
|
*
|
|
179
179
|
|
|
180
|
+
0.5.2 - 2026-08-11
|
|
181
|
+
******************
|
|
182
|
+
|
|
183
|
+
Changed
|
|
184
|
+
=======
|
|
185
|
+
|
|
186
|
+
* The ``CredentialAdmin`` list view is now ordered by the ``created`` timestamp in descending order (most recent first).
|
|
187
|
+
|
|
188
|
+
Removed
|
|
189
|
+
=======
|
|
190
|
+
|
|
191
|
+
* ``CredentialAdmin`` and ``CredentialConfigurationAdmin`` list views no longer allow filtering by the ``learning_context_key``.
|
|
192
|
+
|
|
180
193
|
0.5.1 - 2026-03-17
|
|
181
194
|
******************
|
|
182
195
|
|
|
@@ -177,7 +177,7 @@ class CredentialConfigurationAdmin(DjangoObjectActions, ReverseModelAdmin):
|
|
|
177
177
|
]
|
|
178
178
|
list_display = ('learning_context_key', 'credential_type', 'enabled', 'interval')
|
|
179
179
|
search_fields = ('learning_context_key', 'credential_type__name')
|
|
180
|
-
list_filter = ('
|
|
180
|
+
list_filter = ('credential_type', 'periodic_task__enabled')
|
|
181
181
|
|
|
182
182
|
def get_inline_instances(
|
|
183
183
|
self,
|
|
@@ -260,7 +260,8 @@ class CredentialAdmin(DjangoObjectActions, admin.ModelAdmin): # noqa: D101
|
|
|
260
260
|
"uuid",
|
|
261
261
|
"verify_uuid",
|
|
262
262
|
)
|
|
263
|
-
list_filter = ("
|
|
263
|
+
list_filter = ("configuration__credential_type", "status")
|
|
264
|
+
ordering = ('-created',)
|
|
264
265
|
change_actions = ('reissue_credential',)
|
|
265
266
|
|
|
266
267
|
def get_change_actions(self, request: HttpRequest, object_id: str, form_url: str) -> list[str]:
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/v1/views.py
RENAMED
|
@@ -151,7 +151,6 @@ class CredentialEligibilityView(APIView):
|
|
|
151
151
|
API view for credential eligibility checking and generation.
|
|
152
152
|
|
|
153
153
|
**GET**: Returns detailed eligibility info for all configured credentials in a learning context.
|
|
154
|
-
**POST**: Triggers credential generation for an eligible user.
|
|
155
154
|
|
|
156
155
|
Staff users can operate on behalf of other users via the ``username`` parameter.
|
|
157
156
|
"""
|
|
@@ -192,6 +191,14 @@ class CredentialEligibilityView(APIView):
|
|
|
192
191
|
"(e.g. learning_credentials.processors.retrieve_subsection_grades)."
|
|
193
192
|
),
|
|
194
193
|
),
|
|
194
|
+
apidocs.string_parameter(
|
|
195
|
+
"username",
|
|
196
|
+
ParameterLocation.QUERY,
|
|
197
|
+
description=(
|
|
198
|
+
"Operate on behalf of the specified user. "
|
|
199
|
+
"Staff users may specify any username; non-staff users are limited to their own."
|
|
200
|
+
),
|
|
201
|
+
),
|
|
195
202
|
],
|
|
196
203
|
responses={
|
|
197
204
|
200: CredentialEligibilityResponseSerializer,
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/generators.py
RENAMED
|
@@ -236,7 +236,7 @@ def _render_text_element(
|
|
|
236
236
|
pdf_canvas.drawString(line_x, line_y, line, charSpace=char_space)
|
|
237
237
|
|
|
238
238
|
|
|
239
|
-
def _write_text_on_template( # noqa: PLR0913
|
|
239
|
+
def _write_text_on_template( # noqa: PLR0913,PLR0917
|
|
240
240
|
template: PageObject,
|
|
241
241
|
username: str,
|
|
242
242
|
context_name: str,
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/processors.py
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"""
|
|
2
2
|
This module contains processors for credential criteria.
|
|
3
3
|
|
|
4
|
-
The functions prefixed with `retrieve_` are automatically detected by the admin page and are used to
|
|
5
|
-
|
|
4
|
+
The functions prefixed with `retrieve_` are automatically detected by the admin page and are used to compute
|
|
5
|
+
per-user progress for the credential type, following the contract described below.
|
|
6
6
|
|
|
7
|
-
All processors return ``dict[int, dict[str, Any]]`` — a mapping from user ID to detailed progress info
|
|
8
|
-
Each user's dict always includes an ``is_eligible`` boolean.
|
|
7
|
+
All processors return ``dict[int, dict[str, Any]]`` — a mapping from user ID to detailed progress info for all
|
|
8
|
+
relevant users, including those who are not eligible. Each user's dict always includes an ``is_eligible`` boolean.
|
|
9
9
|
|
|
10
10
|
We will move this module to an external repository (a plugin).
|
|
11
11
|
"""
|
|
@@ -214,7 +214,7 @@ def _retrieve_course_subsection_grades(
|
|
|
214
214
|
course_id: CourseKey, options: dict[str, Any], user_id: int | None = None
|
|
215
215
|
) -> dict[int, dict[str, Any]]:
|
|
216
216
|
"""Retrieve detailed grade progress for enrolled users in a course."""
|
|
217
|
-
required_grades: dict[str,
|
|
217
|
+
required_grades: dict[str, float] = options['required_grades']
|
|
218
218
|
required_grades = {key.lower(): value * 100 for key, value in required_grades.items()}
|
|
219
219
|
|
|
220
220
|
users = get_course_enrollments(course_id, user_id)
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2/learning_credentials.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: learning-credentials
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: A pluggable service for preparing Open edX credentials.
|
|
5
5
|
Author-email: OpenCraft <help@opencraft.com>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -177,6 +177,19 @@ Unreleased
|
|
|
177
177
|
|
|
178
178
|
*
|
|
179
179
|
|
|
180
|
+
0.5.2 - 2026-08-11
|
|
181
|
+
******************
|
|
182
|
+
|
|
183
|
+
Changed
|
|
184
|
+
=======
|
|
185
|
+
|
|
186
|
+
* The ``CredentialAdmin`` list view is now ordered by the ``created`` timestamp in descending order (most recent first).
|
|
187
|
+
|
|
188
|
+
Removed
|
|
189
|
+
=======
|
|
190
|
+
|
|
191
|
+
* ``CredentialAdmin`` and ``CredentialConfigurationAdmin`` list views no longer allow filtering by the ``learning_context_key``.
|
|
192
|
+
|
|
180
193
|
0.5.1 - 2026-03-17
|
|
181
194
|
******************
|
|
182
195
|
|
|
@@ -504,7 +504,7 @@ def test_save_credential(mock_contentfile: Mock, mock_token_hex: Mock, storage:
|
|
|
504
504
|
return_value=Mock(getpdfdata=Mock(return_value=b'pdf_data')),
|
|
505
505
|
)
|
|
506
506
|
@patch('learning_credentials.generators._save_credential', return_value='credential_url')
|
|
507
|
-
def test_generate_pdf_credential(
|
|
507
|
+
def test_generate_pdf_credential( # noqa: PLR0917
|
|
508
508
|
mock_save_credential: Mock,
|
|
509
509
|
mock_write_text_on_template: Mock,
|
|
510
510
|
mock_pdf_writer: Mock,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/__init__.py
RENAMED
|
File without changes
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/__init__.py
RENAMED
|
File without changes
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/urls.py
RENAMED
|
File without changes
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/v1/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/api/v1/urls.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_credentials-0.5.1rc4 → learning_credentials-0.5.2}/learning_credentials/settings/common.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|