learning-credentials 0.2.2rc2__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.
Files changed (45) hide show
  1. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/CHANGELOG.rst +14 -0
  2. {learning_credentials-0.2.2rc2/learning_credentials.egg-info → learning_credentials-0.2.4}/PKG-INFO +15 -1
  3. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/generators.py +2 -1
  4. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/body.html +2 -2
  5. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/body.txt +2 -2
  6. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4/learning_credentials.egg-info}/PKG-INFO +15 -1
  7. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/pyproject.toml +1 -1
  8. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/tests/test_generators.py +2 -1
  9. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/LICENSE.txt +0 -0
  10. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/MANIFEST.in +0 -0
  11. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/README.rst +0 -0
  12. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/__init__.py +0 -0
  13. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/admin.py +0 -0
  14. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/apps.py +0 -0
  15. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/compat.py +0 -0
  16. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/conf/locale/config.yaml +0 -0
  17. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/exceptions.py +0 -0
  18. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/migrations/0001_initial.py +0 -0
  19. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/migrations/0002_migrate_to_learning_credentials.py +0 -0
  20. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/migrations/0003_rename_certificates_to_credentials.py +0 -0
  21. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/migrations/0004_replace_course_keys_with_learning_context_keys.py +0 -0
  22. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/migrations/0005_rename_processors_and_generators.py +0 -0
  23. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/migrations/0006_cleanup_openedx_certificates_tables.py +0 -0
  24. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/migrations/__init__.py +0 -0
  25. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/models.py +0 -0
  26. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/processors.py +0 -0
  27. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/settings/__init__.py +0 -0
  28. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/settings/common.py +0 -0
  29. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/settings/production.py +0 -0
  30. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/tasks.py +0 -0
  31. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/base.html +0 -0
  32. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/from_name.txt +0 -0
  33. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/head.html +0 -0
  34. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/templates/learning_credentials/edx_ace/certificate_generated/email/subject.txt +0 -0
  35. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/urls.py +0 -0
  36. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials/views.py +0 -0
  37. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials.egg-info/SOURCES.txt +0 -0
  38. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials.egg-info/dependency_links.txt +0 -0
  39. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials.egg-info/entry_points.txt +0 -0
  40. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials.egg-info/requires.txt +0 -0
  41. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/learning_credentials.egg-info/top_level.txt +0 -0
  42. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/setup.cfg +0 -0
  43. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/tests/test_models.py +0 -0
  44. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/tests/test_processors.py +0 -0
  45. {learning_credentials-0.2.2rc2 → learning_credentials-0.2.4}/tests/test_tasks.py +0 -0
@@ -16,6 +16,20 @@ Unreleased
16
16
 
17
17
  *
18
18
 
19
+ 0.2.4 - 2025-09-07
20
+
21
+ Added
22
+ =====
23
+
24
+ * Option to customize the learner's name size on the PDF certificate.
25
+
26
+ 0.2.3 - 2025-08-18
27
+
28
+ Modified
29
+ ========
30
+
31
+ * Certificate email template wording.
32
+
19
33
  0.2.2 - 2025-08-05
20
34
 
21
35
  Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: learning-credentials
3
- Version: 0.2.2rc2
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,20 @@ 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
+
184
+ 0.2.3 - 2025-08-18
185
+
186
+ Modified
187
+ ========
188
+
189
+ * Certificate email template wording.
190
+
177
191
  0.2.2 - 2025-08-05
178
192
 
179
193
  Added
@@ -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).
@@ -5,7 +5,7 @@
5
5
  </p>
6
6
 
7
7
  <p>
8
- {% blocktrans %}We are happy to inform you that you have earned a certificate. You should feel very proud of the work you have done in this course. We congratulate you on your efforts and your learning.{% endblocktrans %}
8
+ {% blocktrans %}We are happy to inform you that you have earned a certificate. You should feel very proud of the work you have done in this program. We congratulate you on your efforts and your learning.{% endblocktrans %}
9
9
  </p>
10
10
 
11
11
  <p>
@@ -15,7 +15,7 @@
15
15
 
16
16
  <div>
17
17
  <div>
18
- {% blocktrans %}Thank you for choosing {{ platform_name }} for your learning journey. We look forward to seeing you in more courses in the future.{% endblocktrans %}
18
+ {% blocktrans %}Thank you for choosing {{ platform_name }} for your learning journey. We look forward to seeing you in more programs in the future.{% endblocktrans %}
19
19
  </div>
20
20
  </div>
21
21
 
@@ -2,12 +2,12 @@
2
2
 
3
3
  {% blocktrans %}Thank you for your participation in {{ course_name }} at {{ platform_name }}!{% endblocktrans %}
4
4
 
5
- {% blocktrans %}We are happy to inform you that you have earned a certificate. You should feel very proud of the work you have done in this course. We congratulate you on your efforts and your learning.{% endblocktrans %}
5
+ {% blocktrans %}We are happy to inform you that you have earned a certificate. You should feel very proud of the work you have done in this program. We congratulate you on your efforts and your learning.{% endblocktrans %}
6
6
 
7
7
  {% trans "To view and download your certificate, please click on the following link:" %}
8
8
 
9
9
  {{ certificate_link }}
10
10
 
11
- {% blocktrans %}Thank you for choosing {{ platform_name }} for your learning journey. We look forward to seeing you in more courses in the future.{% endblocktrans %}
11
+ {% blocktrans %}Thank you for choosing {{ platform_name }} for your learning journey. We look forward to seeing you in more programs in the future.{% endblocktrans %}
12
12
 
13
13
  {% endautoescape %}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: learning-credentials
3
- Version: 0.2.2rc2
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,20 @@ 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
+
184
+ 0.2.3 - 2025-08-18
185
+
186
+ Modified
187
+ ========
188
+
189
+ * Certificate email template wording.
190
+
177
191
  0.2.2 - 2025-08-05
178
192
 
179
193
  Added
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "learning-credentials"
3
- version = "0.2.2-rc2"
3
+ version = "0.2.4"
4
4
  description = "A pluggable service for preparing Open edX credentials."
5
5
  dynamic = ["readme"]
6
6
  requires-python = ">=3.11"
@@ -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,)