Open FourierTransformer opened 8 years ago
As of b26aff3625ee39fb7f5756c066a605404a48e5c5, this looks like this:
"solution": {
"answer": 5,
"method": "Numerical Compare",
"json": [json goes here]
},
which makes a problem look a lot like:
{
"level": 1,
"answer_desc": "when you have three things and add two you end up with five things.",
"hint": "basic addition",
"solution": {
"answer": 5,
"method": "Numerical Compare"
},
"category": "Pre-Algebra",
"problem": "Evaluate 3+2",
"name": "test problem",
"date": "October 15th, 2015"
}
and i think I'll go with the bottom one for Value Replace!
other than showing the answer is a lot harder with that... so, i think the value replace will substitue in the supplied "solution" as well as the user's input and then do a verify. Here's hoping for the best!
for problems that accept units, I want to be able to handle natural language inputs. This is already done for duration which will async load a script and then use the compare lookup to determine how to validate the answer - which seems to work well.
For "pure math" answers. I think I'll end up using the math.js api to verify problems. I will have to work around their time limit however.
I'm planning on working around it by just sending it to the user's browser.
At the moment I do a string compare to verify the problem. I need to come up with a way to verify solutions to more than just strings. Potentially send something back from the database. This one gets tough.
So, if
42
was the answer andnumericalCompare
was set,40+2
in the submit box should be valid using the following:For something more complicated (ie calculus) doing a variable replace then a numerical compare might be the easiest way to go: