-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to warn when student uses unusual variable names in a JME part answer. #280
Comments
When the author doesn't give any expected variable names, should the default behaviour be to extract them from the correct answer, or not to do anything? |
Question authors can provide a list of expected variable names for answers to mathematical expression parts. If the student's answer includes a variable name which isn't in this list, on submitting the part the student is given a warning that the variable name is unexpected. If the name can sensibly be split up into more than one variable name, the warning suggests something like "did you mean `x*y`?". If the list of expected names is empty, the check isn't performed and there's no warning. It doesn't catch bad function names, for example in `xln(x)`, at the moment. Should it? Is it ever acceptable to use a function name which isn't defined in the questionscope? ref #280
I've pushed this to master so you can try it at http://numbas.mas.ncl.ac.uk/question/228/issue-280/. Is it OK? |
Needs careful testing - I have done some and there are issues, for example, the error message sometimes says that a variable is unexpected - but of course the student sees the variable in the question and it is clearly not unexpected from their point of view. See part 2 of http://numbas.mas.ncl.ac.uk/question/229/bills-copy-of-issue-280/ and answer 2x_y_z. More later. From: Christian Perfect [notifications@github.com] I've pushed this to master so you can try it at http://numbas.mas.ncl.ac.uk/question/228/issue-280/. Is it OK? — |
"Unexpected" is from the point of view of the marking algorithm: it was expecting only to see x and y, and it saw z as well. What word or phrasing would you prefer? The other option is to do it the other way round and give a list of variable names that should cause the warning to be shown when they're present, but writing out that list means you need to think of |
Not quite, it was expecting in part 2 to only see x , the error message is 'your answer was interpreted to use the unexpected variable name y' Worth taking a little time to mull over this. From: Christian Perfect [notifications@github.com] "Unexpected" is from the point of view of the marking algorithm: it was expecting only to see x and y, and it saw z as well. What word or phrasing would you prefer? The other option is to do it the other way round and give a list of variable names that should cause the warning to be shown when they're present, but writing out that list means you need to think of yx as well as xy, and then the combinatorial madness when there are more variables. — |
In that part you've only put Only the first unexpected variable is mentioned. I could make it list them all, but the warning popup box is only small and it might end up being hard to read. I don't understand what you're trying to do with part 3. The correct answer is |
The problem is that in part 3 there are no expected variables, so the way I would read it is that they should be a warning message similar to that of part 2 saying that x, y and z are unexpected! From: Christian Perfect [mailto:notifications@github.com] In that part you've only put x as an expected variable name, so it's correctly saying y is unexpected. Only the first unexpected variable is mentioned. I could make it list them all, but the warning popup box is only small and it might end up being hard to read. I don't understand what you're trying to do with part 3. The correct answer is x_y_z, so x_y_z is marked correct. Why would there be a message? You haven't set any expected variables. — |
You're right, it's a bad design I thought I could get away with. I'll add a
|
I've documented the expected variable names at http://numbas-editor.readthedocs.org/en/latest/question-parts.html#mathematical-expression. Should I close this now? |
Yes. From: Christian Perfect [mailto:notifications@github.com] I've documented the expected variable names at http://numbas-editor.readthedocs.org/en/latest/question-parts.html#mathematical-expression. Should I close this now? — |
Motivated by questions where the answer is something like
sin(x*y)
. The student might writesin(xy)
, andxy
is interpreted as a single variable.The author should be able to give a list of 'expected' variable names for an answer to a question. If anything else is used, the student is shown a warning.
The text was updated successfully, but these errors were encountered: