learning-credentials 0.2.3__tar.gz → 0.2.4__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.2.3 → learning_credentials-0.2.4}/CHANGELOG.rst +7 -0
- {learning_credentials-0.2.3/learning_credentials.egg-info → learning_credentials-0.2.4}/PKG-INFO +8 -1
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/generators.py +2 -1
- {learning_credentials-0.2.3 → learning_credentials-0.2.4/learning_credentials.egg-info}/PKG-INFO +8 -1
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/pyproject.toml +1 -1
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/tests/test_generators.py +2 -1
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/LICENSE.txt +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/MANIFEST.in +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/README.rst +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/__init__.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/admin.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/apps.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/compat.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/conf/locale/config.yaml +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/exceptions.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/migrations/0001_initial.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/migrations/0002_migrate_to_learning_credentials.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/migrations/0003_rename_certificates_to_credentials.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/migrations/0004_replace_course_keys_with_learning_context_keys.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/migrations/0005_rename_processors_and_generators.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/migrations/0006_cleanup_openedx_certificates_tables.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/migrations/__init__.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/models.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/processors.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/settings/__init__.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/settings/common.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/settings/production.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/tasks.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/base.html +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/body.html +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/body.txt +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/from_name.txt +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/head.html +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/subject.txt +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/urls.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/views.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials.egg-info/SOURCES.txt +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials.egg-info/dependency_links.txt +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials.egg-info/entry_points.txt +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials.egg-info/requires.txt +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials.egg-info/top_level.txt +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/setup.cfg +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/tests/test_models.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/tests/test_processors.py +0 -0
- {learning_credentials-0.2.3 → learning_credentials-0.2.4}/tests/test_tasks.py +0 -0
{learning_credentials-0.2.3/learning_credentials.egg-info → learning_credentials-0.2.4}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: learning-credentials
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
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
|
|
@@ -174,6 +174,13 @@ Unreleased
|
|
|
174
174
|
|
|
175
175
|
*
|
|
176
176
|
|
|
177
|
+
0.2.4 - 2025-09-07
|
|
178
|
+
|
|
179
|
+
Added
|
|
180
|
+
=====
|
|
181
|
+
|
|
182
|
+
* Option to customize the learner's name size on the PDF certificate.
|
|
183
|
+
|
|
177
184
|
0.2.3 - 2025-08-18
|
|
178
185
|
|
|
179
186
|
Modified
|
{learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/generators.py
RENAMED
|
@@ -89,7 +89,7 @@ def _write_text_on_template(template: any, font: str, username: str, context_nam
|
|
|
89
89
|
pdf_canvas = canvas.Canvas(io.BytesIO(), pagesize=(template_width, template_height))
|
|
90
90
|
|
|
91
91
|
# Write the learner name.
|
|
92
|
-
pdf_canvas.setFont(font, 32)
|
|
92
|
+
pdf_canvas.setFont(font, options.get('name_size', 32))
|
|
93
93
|
name_color = options.get('name_color', '#000')
|
|
94
94
|
pdf_canvas.setFillColorRGB(*hex_to_rgb(name_color))
|
|
95
95
|
|
|
@@ -184,6 +184,7 @@ def generate_pdf_credential(
|
|
|
184
184
|
- font: The name of the font to use.
|
|
185
185
|
- name_y: The Y coordinate of the name on the credential (vertical position on the template).
|
|
186
186
|
- name_color: The color of the name on the credential (hexadecimal color code).
|
|
187
|
+
- name_size: The font size of the name on the credential. The default value is 32.
|
|
187
188
|
- context_name: Specify the custom course or Learning Path name.
|
|
188
189
|
- context_name_y: The Y coordinate of the context name on the credential (vertical position on the template).
|
|
189
190
|
- context_name_color: The color of the context name on the credential (hexadecimal color code).
|
{learning_credentials-0.2.3 → learning_credentials-0.2.4/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.2.
|
|
3
|
+
Version: 0.2.4
|
|
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
|
|
@@ -174,6 +174,13 @@ Unreleased
|
|
|
174
174
|
|
|
175
175
|
*
|
|
176
176
|
|
|
177
|
+
0.2.4 - 2025-09-07
|
|
178
|
+
|
|
179
|
+
Added
|
|
180
|
+
=====
|
|
181
|
+
|
|
182
|
+
* Option to customize the learner's name size on the PDF certificate.
|
|
183
|
+
|
|
177
184
|
0.2.3 - 2025-08-18
|
|
178
185
|
|
|
179
186
|
Modified
|
|
@@ -76,6 +76,7 @@ def test_register_font_with_custom_font(mock_register_font: Mock, mock_font_clas
|
|
|
76
76
|
'context_name_color': '#9B192A',
|
|
77
77
|
'issue_date_color': '#f59a8e',
|
|
78
78
|
'context_name_size': 20,
|
|
79
|
+
'name_size': 24,
|
|
79
80
|
},
|
|
80
81
|
{
|
|
81
82
|
'name_color': (17 / 255, 34 / 255, 51 / 255),
|
|
@@ -131,7 +132,7 @@ def test_write_text_on_template(mock_canvas_class: Mock, context_name: str, opti
|
|
|
131
132
|
assert canvas_object.drawString.call_count == 3 + context_name.count('\n')
|
|
132
133
|
|
|
133
134
|
# Check the calls to setFont, setFillColorRGB and drawString methods on Canvas object
|
|
134
|
-
assert canvas_object.setFont.call_args_list[0] == call(font, 32)
|
|
135
|
+
assert canvas_object.setFont.call_args_list[0] == call(font, options.get('name_size', 32))
|
|
135
136
|
assert canvas_object.setFillColorRGB.call_args_list[0] == call(*expected_name_color)
|
|
136
137
|
assert canvas_object.drawString.call_args_list[0] == call(expected_name_x, expected_name_y, username)
|
|
137
138
|
assert mock_canvas_class.return_value.stringWidth.mock_calls[0][1] == (username,)
|
|
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.2.3 → learning_credentials-0.2.4}/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
|
{learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/processors.py
RENAMED
|
File without changes
|
{learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials/settings/__init__.py
RENAMED
|
File without changes
|
{learning_credentials-0.2.3 → learning_credentials-0.2.4}/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
|
{learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_credentials-0.2.3 → learning_credentials-0.2.4}/learning_credentials.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|