More descriptive error messages for UndefinedVariable - #18158
Conversation
|
Thanks for the pull request, @jolyonb! I've created OSPR-2394 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams. Feel free to add as much of the following information to the ticket:
All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here. |
|
@jolyonb Feel free to ping me when this is ready to be reviewed |
|
@jolyonb Are you still working on this PR? Is there anything we can do to help? |
|
@mduboseedx I'm done with the coding part; all that's needed are tests I believe. @pdpinch was going to work on those... |
|
jenkins run all |
4bba8cb to
b41c986
Compare
|
@mduboseedx this has (passing) tests now and is ready for review. |
|
@edx/learner-product This adds a more descriptive and helpful error message for learners when inputting formulas. Could you take a look? |
|
Bump? |
|
@edx/learner-product @marcotuts Have you had a chance to give this a look? |
|
This can move to awaiting prioritization on the engineering side, but this is actually something for the educator team to review, not learner as it turns out. :) @mduboseedx |
|
Ok guys, bump? This one is pretty straightforward... |
|
@edx/educator-all @scottrish Do you know when this could be given a review? |
|
Bump... |
|
@jolyonb I'm sorry for the long delay. Unfortunately our Educator team will actually be unable to review any PRs for the next few weeks. I'll see if I can find someone else to give this a look over. |
b41c986 to
9afaf5b
Compare
|
jenkins run bokchoy |
1 similar comment
|
jenkins run bokchoy |
|
I'm getting bokchoy errors: Is this a known bad test? I've run the tests three times now and gotten the same error message three times. I don't touch anything related to this test with this PR... |
|
jenkins run bokchoy |
|
@jolyonb Sorry for the delay as I was out of the office last week. You may want to try a rebase and we can then run the bokchoy tests again. |
9afaf5b to
4f5ffd6
Compare
|
Now I'm even more confused. The bokchoy tests ended in failure, yet there are no test failures? I guess we'll try again... jenkins run bokchoy |
4f5ffd6 to
07eabea
Compare
|
jenkins run lettuce |
42616b9 to
b43f224
Compare
|
Your PR has finished running tests. There were no failures. |
|
@mduboseedx This is now tested and ready for review. |
|
@pdpinch As this is an Educator type of pull request, if you feel comfortable with the code then you are welcome to merge this change. |
|
@jolyonb 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Wednesday, September 19, 2018. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
This PR updates the error messages presented to students when they try to use an invalid variable or function in a formula.
Current behavior:
Invalid input: x not permitted in answer.(using variablex)Invalid input: f not permitted in answer.(using functionf)Note that there is no mention of how
xorfare actually being used in the formula. This is particularly frustrating to students who write something likex(1+x), wherex*(1+x)is required (and accounts for a significant percentage of forum posts in math-based courses). The error message simply tells students that x is not permitted, becausexhas been treated as an invalid function.This PR addresses this issue by providing more intelligent error messages to students:
Invalid Input: x not permitted in answer as a variable(using variablex)X, valid variablex)Invalid Input: f not permitted in answer as a function(using functionf)Invalid Input: Sin not permitted in answer as a function (did you mean sin?)(using invalid functionSin, valid functionsin)Invalid Input: x not permitted in answer as a function (did you forget to use * for multiplication?)(using variablex)This is a WIP while we update old tests and construct new ones.
Mentions: @pdpinch @jefrench