fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
revert stupid change
[fnpeditor.git]
/
src
/
wlxml
/
extensions
/
edumed
/
edumed.js
diff --git
a/src/wlxml/extensions/edumed/edumed.js
b/src/wlxml/extensions/edumed/edumed.js
index
6e01d6e
..
ca29ad3
100644
(file)
--- a/
src/wlxml/extensions/edumed/edumed.js
+++ b/
src/wlxml/extensions/edumed/edumed.js
@@
-157,6
+157,9
@@
var extension = {wlxmlClass: {'exercise.order': {
}}};
var choiceMethods = {
}}};
var choiceMethods = {
+ isContextRoot: function(node) {
+ return this.object.isChoiceList(node.parent()) || this.sameNode(node);
+ },
getChoiceList: function() {
return this.contents()
.filter(function(n) { return this.object.isChoiceList(n); }.bind(this))[0];
getChoiceList: function() {
return this.contents()
.filter(function(n) { return this.object.isChoiceList(n); }.bind(this))[0];
@@
-209,6
+212,14
@@
extension.wlxmlClass['exercise.choice.true-or-false'] = {
methods: choiceMethods
};
methods: choiceMethods
};
+extension.wlxmlClass['exercise.gap'] = extension.wlxmlClass['exercise.replace'] = {
+ methods: {
+ isContextRoot: function(node) {
+ return this.sameNode(node);
+ }
+ }
+};
+
extension.document = {
methods: {
edumedCreateExerciseNode: function(klass) {
extension.document = {
methods: {
edumedCreateExerciseNode: function(klass) {