-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#554 Adjusted all relevant obonode converters and JSON to XML parsers…
… to add variable support. Created migration to add a 'state' column to visits for tracking variable values per visit, for use in tracking those same generated values when starting an assessment attempt. Added support for variable usage in assessment attempt and review contexts.
- Loading branch information
1 parent
1a7b13a
commit 1f35d07
Showing
48 changed files
with
180 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
208 changes: 0 additions & 208 deletions
208
packages/app/obojobo-document-engine/src/scripts/viewer/stores/variable-store.old.js
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/app/obojobo-document-engine/src/scripts/viewer/util/variable-util.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
packages/app/obojobo-document-json-parser/src/parsers/break-node-parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
packages/app/obojobo-document-json-parser/src/parsers/code-node-parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
const textGroupParser = require('../text-group-parser') | ||
const processAttrs = require('../process-attrs') | ||
const processTriggers = require('../process-triggers') | ||
const processVars = require('../process-vars') | ||
const processObjectives = require('../process-objectives') | ||
const codeNodeParser = node => { | ||
const id = node.id ? ` id="${node.id}"` : '' | ||
const attrs = processAttrs(node.content, ['triggers', 'textGroup']) | ||
const textGroupXML = textGroupParser(node.content.textGroup) | ||
const triggersXML = processTriggers(node.content.triggers) | ||
const varsXML = processVars(node.content.variables) | ||
const objectivesXML = processObjectives(node.content.objectives) | ||
|
||
return `<Code${attrs}${id}>` + textGroupXML + triggersXML + objectivesXML + `</Code>` | ||
return `<Code${attrs}${id}>` + textGroupXML + triggersXML + objectivesXML + varsXML `</Code>` | ||
} | ||
|
||
module.exports = codeNodeParser |
3 changes: 3 additions & 0 deletions
3
packages/app/obojobo-document-json-parser/src/parsers/content-node-parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.