excel2moodle 0.6.4__tar.gz → 0.6.5__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 (53) hide show
  1. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/PKG-INFO +6 -1
  2. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/README.md +5 -0
  3. excel2moodle-0.6.5/excel2moodle/extra/scriptCaller.py +27 -0
  4. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle.egg-info/PKG-INFO +6 -1
  5. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle.egg-info/SOURCES.txt +1 -0
  6. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/pyproject.toml +1 -1
  7. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/LICENSE +0 -0
  8. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/__init__.py +0 -0
  9. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/__main__.py +0 -0
  10. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/__init__.py +0 -0
  11. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/bullets.py +0 -0
  12. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/category.py +0 -0
  13. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/dataStructure.py +0 -0
  14. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/etHelpers.py +0 -0
  15. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/exceptions.py +0 -0
  16. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/globals.py +0 -0
  17. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/parser.py +0 -0
  18. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/question.py +0 -0
  19. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/settings.py +0 -0
  20. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/stringHelpers.py +0 -0
  21. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/core/validator.py +0 -0
  22. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/extra/__init__.py +0 -0
  23. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/extra/equationVerification.py +0 -0
  24. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/extra/updateQuery.py +0 -0
  25. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/extra/variableGenerator.py +0 -0
  26. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/logger.py +0 -0
  27. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/question_types/__init__.py +0 -0
  28. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/question_types/cloze.py +0 -0
  29. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/question_types/mc.py +0 -0
  30. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/question_types/nf.py +0 -0
  31. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/question_types/nfm.py +0 -0
  32. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/UI_equationChecker.py +0 -0
  33. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/UI_exportSettingsDialog.py +0 -0
  34. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/UI_mainWindow.py +0 -0
  35. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/UI_updateDlg.py +0 -0
  36. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/UI_variableGenerator.py +0 -0
  37. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/UI_variantDialog.py +0 -0
  38. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/__init__.py +0 -0
  39. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/appUi.py +0 -0
  40. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/dialogs.py +0 -0
  41. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/equationChecker.py +0 -0
  42. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle/ui/treewidget.py +0 -0
  43. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle.egg-info/dependency_links.txt +0 -0
  44. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle.egg-info/entry_points.txt +0 -0
  45. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle.egg-info/requires.txt +0 -0
  46. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/excel2moodle.egg-info/top_level.txt +0 -0
  47. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/setup.cfg +0 -0
  48. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/test/test_bullets.py +0 -0
  49. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/test/test_feedbacking.py +0 -0
  50. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/test/test_nfmParsing.py +0 -0
  51. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/test/test_parseQuestion.py +0 -0
  52. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/test/test_picture.py +0 -0
  53. {excel2moodle-0.6.4 → excel2moodle-0.6.5}/test/test_questionDataGet.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: excel2moodle
3
- Version: 0.6.4
3
+ Version: 0.6.5
4
4
  Summary: A package for converting questions from a spreadsheet, to valid moodle-xml
5
5
  Author: Jakob Bosse
6
6
  License-Expression: GPL-3.0-or-later
@@ -90,6 +90,11 @@ If You want to support my work as well, you can by me a [coffee](https://ko-fi.c
90
90
 
91
91
  # Changelogs
92
92
 
93
+ ## 0.6.5 (2025-09-02)
94
+ Added Scripted Media Support now with the module
95
+
96
+ No changes.
97
+
93
98
  ## 0.6.4 (2025-09-02)
94
99
  Added Scripted Media Support
95
100
 
@@ -68,6 +68,11 @@ If You want to support my work as well, you can by me a [coffee](https://ko-fi.c
68
68
 
69
69
  # Changelogs
70
70
 
71
+ ## 0.6.5 (2025-09-02)
72
+ Added Scripted Media Support now with the module
73
+
74
+ No changes.
75
+
71
76
  ## 0.6.4 (2025-09-02)
72
77
  Added Scripted Media Support
73
78
 
@@ -0,0 +1,27 @@
1
+ import logging
2
+ import re
3
+
4
+ import lxml.etree as ET
5
+
6
+ from excel2moodle.core.question import Parametrics
7
+
8
+ loggerObj = logging.getLogger(__name__)
9
+
10
+
11
+ class MediaCall:
12
+ def __init__(self, callString: str, divId: str) -> None:
13
+ self.call: str = re.sub(r"\(", f'("{divId}", ', callString)
14
+ self._scriptElem = ET.Element("script")
15
+ self._scriptElem.text = callString
16
+ self.divId = divId
17
+
18
+ @property
19
+ def element(self) -> ET.Element:
20
+ return self._scriptElem
21
+
22
+ def update(self, parametrics: Parametrics, variant: int = 0) -> None:
23
+ updatedCall = self.call
24
+ for var, val in parametrics.variables.items():
25
+ updatedCall = re.sub(rf",\s+{var}\s*", f", {val[variant]}", updatedCall)
26
+ self._scriptElem.text = updatedCall
27
+ loggerObj.info("Inserted function call: %s", updatedCall)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: excel2moodle
3
- Version: 0.6.4
3
+ Version: 0.6.5
4
4
  Summary: A package for converting questions from a spreadsheet, to valid moodle-xml
5
5
  Author: Jakob Bosse
6
6
  License-Expression: GPL-3.0-or-later
@@ -90,6 +90,11 @@ If You want to support my work as well, you can by me a [coffee](https://ko-fi.c
90
90
 
91
91
  # Changelogs
92
92
 
93
+ ## 0.6.5 (2025-09-02)
94
+ Added Scripted Media Support now with the module
95
+
96
+ No changes.
97
+
93
98
  ## 0.6.4 (2025-09-02)
94
99
  Added Scripted Media Support
95
100
 
@@ -24,6 +24,7 @@ excel2moodle/core/stringHelpers.py
24
24
  excel2moodle/core/validator.py
25
25
  excel2moodle/extra/__init__.py
26
26
  excel2moodle/extra/equationVerification.py
27
+ excel2moodle/extra/scriptCaller.py
27
28
  excel2moodle/extra/updateQuery.py
28
29
  excel2moodle/extra/variableGenerator.py
29
30
  excel2moodle/question_types/__init__.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "excel2moodle"
7
- version = "0.6.4"
7
+ version = "0.6.5"
8
8
  authors = [
9
9
  { name="Jakob Bosse" },
10
10
  ]
File without changes
File without changes