wlxml: Missing exercise templates
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 6 Aug 2014 11:58:18 +0000 (13:58 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 14 Aug 2014 14:26:14 +0000 (16:26 +0200)
src/wlxml/extensions/edumed/choice.xml [new file with mode: 0644]
src/wlxml/extensions/edumed/choiceSingle.xml [new file with mode: 0644]
src/wlxml/extensions/edumed/choiceTrueOrFalse.xml [new file with mode: 0644]
src/wlxml/extensions/edumed/edumed.js
src/wlxml/extensions/edumed/gaps.xml [new file with mode: 0644]
src/wlxml/extensions/edumed/replace.xml [new file with mode: 0644]

diff --git a/src/wlxml/extensions/edumed/choice.xml b/src/wlxml/extensions/edumed/choice.xml
new file mode 100644 (file)
index 0000000..78d372b
--- /dev/null
@@ -0,0 +1,6 @@
+<div class="exercise.choice">
+    <div class="p"></div>
+    <div class="list">
+        <div class="item.answer" answer="true"></div>
+    </div>
+</div>
\ No newline at end of file
diff --git a/src/wlxml/extensions/edumed/choiceSingle.xml b/src/wlxml/extensions/edumed/choiceSingle.xml
new file mode 100644 (file)
index 0000000..452d4a4
--- /dev/null
@@ -0,0 +1,6 @@
+<div class="exercise.choice.single">
+    <div class="p"></div>
+    <div class="list">
+        <div class="item.answer" answer="true"></div>
+    </div>
+</div>
\ No newline at end of file
diff --git a/src/wlxml/extensions/edumed/choiceTrueOrFalse.xml b/src/wlxml/extensions/edumed/choiceTrueOrFalse.xml
new file mode 100644 (file)
index 0000000..a67623c
--- /dev/null
@@ -0,0 +1,6 @@
+<div class="exercise.choice.true-or-false">
+    <div class="p"></div>
+    <div class="list">
+        <div class="item.answer" answer="true"></div>
+    </div>
+</div>
\ No newline at end of file
index fb0885a..6e01d6e 100644 (file)
@@ -3,7 +3,14 @@ define(function(require) {
 'use strict';
 
 var _ = require('libs/underscore'),
-    orderExerciseTemplate = require('libs/text!./order.xml');
+    templates = {
+        order: require('libs/text!./order.xml'),
+        choice: require('libs/text!./choice.xml'),
+        'choice.single': require('libs/text!./choiceSingle.xml'),
+        'choice.true-or-false': require('libs/text!./choiceTrueOrFalse.xml'),
+        gap: require('libs/text!./gaps.xml'),
+        replace: require('libs/text!./replace.xml')
+    };
 
 var Item = function(node, exerciseNode) {
     Object.defineProperty(this, 'text', {
@@ -206,7 +213,7 @@ extension.document = {
     methods: {
          edumedCreateExerciseNode: function(klass) {
             void(klass);
-            return this.createDocumentNode(orderExerciseTemplate);
+            return this.createDocumentNode(templates[klass]);
          }
     }
 };
diff --git a/src/wlxml/extensions/edumed/gaps.xml b/src/wlxml/extensions/edumed/gaps.xml
new file mode 100644 (file)
index 0000000..0a5b40f
--- /dev/null
@@ -0,0 +1,3 @@
+<div class="exercise.gap">
+    <div class="p"></div>
+</div>
\ No newline at end of file
diff --git a/src/wlxml/extensions/edumed/replace.xml b/src/wlxml/extensions/edumed/replace.xml
new file mode 100644 (file)
index 0000000..2ff71c2
--- /dev/null
@@ -0,0 +1,3 @@
+<div class="exercise.replace">
+  <div class="p"></div>
+</div>
\ No newline at end of file