Created
July 10, 2012 14:56
-
-
Save knowuh/3083844 to your computer and use it in GitHub Desktop.
converter tool branching error?
This file contains hidden or 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
"steps": [ | |
{ | |
"url": "/shared/activity-with-a-line-construction-tool/page/1-this-is-the-first-page/step/1", | |
"activityPage": "/shared/activity-with-a-line-construction-tool/page/1-this-is-the-first-page", | |
"beforeText": "Construct a line with y-interept 0.0, with slope 1.0", | |
"...":"...", | |
"submitButtonTitle": "Check My Answer", | |
"defaultBranch": "/shared/activity-with-a-line-construction-tool/page/1-this-is-the-first-page/step/5", | |
"...":"...", | |
"responseBranches": [ | |
{ | |
"criterion": [ | |
"and", | |
[ | |
"withinAbsTolerance", | |
1, | |
[ | |
"lineSlope", | |
"freehand-sketch-1", | |
"1" | |
], | |
0.1 | |
], | |
[ | |
"withinAbsTolerance", | |
0, | |
[ | |
"yIntercept", | |
"freehand-sketch-1", | |
"1" | |
], | |
0.1 | |
] | |
], | |
"step": "/shared/activity-with-a-line-construction-tool/page/1-this-is-the-first-page/step/2" | |
}, | |
"...":"..." }] | |
}, | |
{ | |
"url": "/shared/activity-with-a-line-construction-tool/page/1-this-is-the-first-page/step/2", | |
"activityPage": "/shared/activity-with-a-line-construction-tool/page/1-this-is-the-first-page", | |
"beforeText": "<b>Incorrect. Try again.</b><p>Construct a line with y-interept 0.0, with slope 1.0</p>", | |
"...":"..." | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems like all of the response branches need a "not" operator on them. For example in the gist above:
I would expect if:
( withinAbsTolerance (1, ('lineslope', 'freehand-sketch-1', '1'), 0.1) && withinAbsTolerance (0,('yIntercept', 'freehand-sketch-1', '1'), 0.1))
Evaluated to true, we would go the correct page. But instead we go to the 'everything wrong' page...