Skip to content

Commit e4e39f5

Browse files
authored
Merge pull request #72 from Simon-Initiative/authoring-2246-math-input
Math input question authoring support
2 parents c99169e + 161d563 commit e4e39f5

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/main/java/edu/cmu/oli/content/contentfiles/writers/ResourceToXml.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ private void cleanupAssessment2(Document document) {
418418
Attribute whitespace = el.getAttribute("whitespace");
419419
Attribute caseSensitive = el.getAttribute("case_sensitive");
420420
Attribute select2 = el.getAttribute("select");
421+
// AW: new attributes for math input
422+
Attribute evaluation = el.getAttribute("evaluation");
423+
Attribute keyboard = el.getAttribute("keyboard");
421424
if (whitespace != null) {
422425
whitespace.detach();
423426
if (!whitespace.getValue().isEmpty()) {
@@ -436,6 +439,18 @@ private void cleanupAssessment2(Document document) {
436439
((Element) el.getParent()).setAttribute(select2);
437440
}
438441
}
442+
if (evaluation != null) {
443+
evaluation.detach();
444+
if (!evaluation.getValue().isEmpty()) {
445+
((Element) el.getParent()).setAttribute(evaluation);
446+
}
447+
}
448+
if (keyboard != null) {
449+
keyboard.detach();
450+
if (!keyboard.getValue().isEmpty()) {
451+
((Element) el.getParent()).setAttribute(keyboard);
452+
}
453+
}
439454
el.removeAttribute("notation");
440455
}
441456
if (el.getName().equalsIgnoreCase("selection")) {

0 commit comments

Comments
 (0)