From 5941000de3d3092ab0386e14a17b62344b85d25b Mon Sep 17 00:00:00 2001 From: Jan Maximilian Michal <j.michal@stud.uni-goettingen.de> Date: Mon, 12 Dec 2016 21:07:42 +0000 Subject: [PATCH] Fixed numeric error. Gap is now complete --- hallgrim/IliasXMLCreator/gap.py | 2 -- hallgrim/IliasXMLCreator/xmlBuildingBlocks.py | 4 +-- scripts/gap_test.py | 30 ------------------- 3 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 scripts/gap_test.py diff --git a/hallgrim/IliasXMLCreator/gap.py b/hallgrim/IliasXMLCreator/gap.py index 71b5923..936c66a 100644 --- a/hallgrim/IliasXMLCreator/gap.py +++ b/hallgrim/IliasXMLCreator/gap.py @@ -75,8 +75,6 @@ class GapQuestion: f = response_num("gap_{}".format(gap_ident), self.gap_length, item[0][1], item[0][2]) gap_ident += 1 flow.append(f) - - return root ############################################################################ diff --git a/hallgrim/IliasXMLCreator/xmlBuildingBlocks.py b/hallgrim/IliasXMLCreator/xmlBuildingBlocks.py index c35ebac..238591e 100644 --- a/hallgrim/IliasXMLCreator/xmlBuildingBlocks.py +++ b/hallgrim/IliasXMLCreator/xmlBuildingBlocks.py @@ -14,7 +14,7 @@ def xml_print(element, **kwargs): import xml.dom.minidom xml = xml.dom.minidom.parseString(et.tostring(element, encoding='utf8', method='xml')) # or xml.dom.minidom.parseString(xml_string) - print( xml.toprettyxml(), **kwargs ) + print(xml.toprettyxml(), **kwargs) def simple_element(name, text=None, attrib={}): @@ -147,7 +147,7 @@ def response_choice(ident, answers): def response_num(ident, columns, _min, _max, numtype='Decimal'): response_num = et.Element('response_num', attrib={'ident': ident, 'numtype': numtype, 'rcardinality': 'Single'}) - render_fib = et.Element('render_fib', attrib={'columns': columns, 'fibtype': numtype, 'maxnumber': _min, 'minnumber': _max, 'prompt': "Box"}) + render_fib = et.Element('render_fib', attrib={'columns': str(columns), 'fibtype': numtype, 'maxnumber': _max, 'minnumber': _min, 'prompt': "Box"}) response_num.append(render_fib) return response_num diff --git a/scripts/gap_test.py b/scripts/gap_test.py deleted file mode 100644 index c7ad382..0000000 --- a/scripts/gap_test.py +++ /dev/null @@ -1,30 +0,0 @@ -meta = { - 'author': 'ILIAS Author', - 'title': 'gap_test', - 'type': 'gap', - 'points': 0.0, -} - -task = """[gap]LALAL2[/gap] KJAakjsfdaskdjfnalksdf - - -```java - -class Auto { - final int tiers = [gap]4[/gap]; -} - -[select] - [3] `int n_ze = m.length;` - [ ] `int n_ze = m[0].length;` - [ ] `int n_ze = m.length();` - [ ] `int n_ze = m[0].length();` -[/select] - -public static void main { - System.out.println("[gap]LALAL2[/gap]"); -} -``` - -END""" -feedback = """ decription """ -- GitLab