excel2moodle 0.6.4__py3-none-any.whl → 0.6.5__py3-none-any.whl
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.
- excel2moodle/extra/scriptCaller.py +27 -0
- {excel2moodle-0.6.4.dist-info → excel2moodle-0.6.5.dist-info}/METADATA +6 -1
- {excel2moodle-0.6.4.dist-info → excel2moodle-0.6.5.dist-info}/RECORD +7 -6
- {excel2moodle-0.6.4.dist-info → excel2moodle-0.6.5.dist-info}/WHEEL +0 -0
- {excel2moodle-0.6.4.dist-info → excel2moodle-0.6.5.dist-info}/entry_points.txt +0 -0
- {excel2moodle-0.6.4.dist-info → excel2moodle-0.6.5.dist-info}/licenses/LICENSE +0 -0
- {excel2moodle-0.6.4.dist-info → excel2moodle-0.6.5.dist-info}/top_level.txt +0 -0
@@ -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.
|
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
|
|
@@ -15,6 +15,7 @@ excel2moodle/core/stringHelpers.py,sha256=OzFZ6Eu3PeBLKb61K-aeVfUZmVuBerr9KfyOsu
|
|
15
15
|
excel2moodle/core/validator.py,sha256=6nZIyTwcXPT2jgi31QrBGur3Cq7A3Q9btLp5ALFEsKw,4998
|
16
16
|
excel2moodle/extra/__init__.py,sha256=PM-id60HD21A3IcGC_fCYFihS8osBGZMIJCcN-ZRsIM,293
|
17
17
|
excel2moodle/extra/equationVerification.py,sha256=oQpk-4cM0x_vKGEexC0Z1UyVoGG7w3V3RydtkM0MV_Y,3869
|
18
|
+
excel2moodle/extra/scriptCaller.py,sha256=nJsUxz0EzoChobCJbAbfS8NSMghdUFV6oEPdO6J6KlU,850
|
18
19
|
excel2moodle/extra/updateQuery.py,sha256=kD_L23Qea9Cx4zUwfQVNJXXFbybd9cwE8sSbZrz7VF8,1554
|
19
20
|
excel2moodle/extra/variableGenerator.py,sha256=qYY9i872yJAE4_nrxy_M5jCdMtGgVKB7yz1Th31bySY,11486
|
20
21
|
excel2moodle/question_types/__init__.py,sha256=81mss0g7SVtnlb-WkydE28G_dEAAf6oT1uB8lpK2-II,1041
|
@@ -33,9 +34,9 @@ excel2moodle/ui/appUi.py,sha256=woISWvPFegL9e0ntORNaMM1IxQSlP7qAHhYmNsYfI6U,1504
|
|
33
34
|
excel2moodle/ui/dialogs.py,sha256=du6v17lh6LhgDDK0QltPzD-z8wUn3aD4QzaAQBmiTBQ,7314
|
34
35
|
excel2moodle/ui/equationChecker.py,sha256=RII9DlZAlHqe5udBWzeUaozhtyi3ZkCZs8h3-oO6pEw,2700
|
35
36
|
excel2moodle/ui/treewidget.py,sha256=3hZRLlrhp4FMXFyNY0LGDy7k1RSuKH87QyqB1N4qOqg,2335
|
36
|
-
excel2moodle-0.6.
|
37
|
-
excel2moodle-0.6.
|
38
|
-
excel2moodle-0.6.
|
39
|
-
excel2moodle-0.6.
|
40
|
-
excel2moodle-0.6.
|
41
|
-
excel2moodle-0.6.
|
37
|
+
excel2moodle-0.6.5.dist-info/licenses/LICENSE,sha256=ywQqe6Sitymkf2lV2NRcx_aGsaC-KbSl_EfEsRXmNRw,35135
|
38
|
+
excel2moodle-0.6.5.dist-info/METADATA,sha256=nyPFcKgz5IqewsbtgdHk5nJgjv140bQpshhJu6GmYZ8,12190
|
39
|
+
excel2moodle-0.6.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
40
|
+
excel2moodle-0.6.5.dist-info/entry_points.txt,sha256=myfMLDThuGgWHMJDPPfILiZqo_7D3fhmDdJGqWOAjPw,60
|
41
|
+
excel2moodle-0.6.5.dist-info/top_level.txt,sha256=5V1xRUQ9o7UmOCmNoWCZPAuy5nXp3Qbzyqch8fUGT_c,13
|
42
|
+
excel2moodle-0.6.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|