From: Aleksander Ɓukasz Date: Wed, 6 Aug 2014 11:58:18 +0000 (+0200) Subject: wlxml: Missing exercise templates X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/533315fd2da2d90c678e54801dd97c9114335a20?ds=inline;hp=e789468531597875c9c171d0554230856d40a2b9 wlxml: Missing exercise templates --- diff --git a/src/wlxml/extensions/edumed/choice.xml b/src/wlxml/extensions/edumed/choice.xml new file mode 100644 index 0000000..78d372b --- /dev/null +++ b/src/wlxml/extensions/edumed/choice.xml @@ -0,0 +1,6 @@ +
+
+
+
+
+
\ 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 index 0000000..452d4a4 --- /dev/null +++ b/src/wlxml/extensions/edumed/choiceSingle.xml @@ -0,0 +1,6 @@ +
+
+
+
+
+
\ 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 index 0000000..a67623c --- /dev/null +++ b/src/wlxml/extensions/edumed/choiceTrueOrFalse.xml @@ -0,0 +1,6 @@ +
+
+
+
+
+
\ No newline at end of file diff --git a/src/wlxml/extensions/edumed/edumed.js b/src/wlxml/extensions/edumed/edumed.js index fb0885a..6e01d6e 100644 --- a/src/wlxml/extensions/edumed/edumed.js +++ b/src/wlxml/extensions/edumed/edumed.js @@ -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 index 0000000..0a5b40f --- /dev/null +++ b/src/wlxml/extensions/edumed/gaps.xml @@ -0,0 +1,3 @@ +
+
+
\ 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 index 0000000..2ff71c2 --- /dev/null +++ b/src/wlxml/extensions/edumed/replace.xml @@ -0,0 +1,3 @@ +
+
+
\ No newline at end of file