-
-
Notifications
You must be signed in to change notification settings - Fork 80
Add a default checker to the parserGraphTool.pl macro. #840
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 a default checker to the parserGraphTool.pl macro. #840
Conversation
|
Examples of problems using the default checker are attached. |
e8f0c74 to
534be56
Compare
Alex-Jordan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked out this branch and tested by playing with a few sample files, and it worked as advertised.
|
The shaded regions in the plane I don't think are working. Here's an example for Problem #11
When I clicked the point (0,0) for the fill point, I got the correct answer. I also had trouble with the same issue on problem #10 in that the fill only gave the correct answer when clicked at the exact point in the solution. |
|
The behavior you are describing would be the behavior for this problem without this pull request. I just verified that with that problem and this pull request, I can choose any point in the correct region, and it is marked correct. Are you sure that you have this pull request checked out? Also possible (but seemingly unlikely) is that you have a local copy of the parserGraphTool.pl macro in your courses macro directory that is overriding this. |
|
There are no other macros in the course macros directory. I also added a warn statement in the init method graphTools.pl macro to ensure it's loading. All of the other examples are working in this set. |
|
What is the seed that you are using? |
|
Also, try adding a warn statement in the default checker added in this pull request to see that the checker is being called. |
The default checker is designed to grade the graph based on appearance. This means that if a student graphs duplicate objects, then the duplicates are ignored. Furthermore, if two objects are graphed whose only difference is that one is solid and the other is dashed (in this case the dashed object is covered by the solid object and only the solid object is really visible), then the dashed object is ignored. Note that fills are only checked by this checker if the other graph objects are correct. This is because, without the other elements of the correct answer, there is not a valid setting to evaluate if the fill is correct or not. The variable `$graphToolObjectCmps` is made available for use in custom checkers, and contains a hash whose keys are the types of the objects available (line, circle, parabola, fill, point, cubic, quadratic, and inverval), and whose values are methods that can be called passing one of these objects (typically a correct answer in a checker). When one of these methods is called it will return two methods. The first method when called passing a MathObject point will return 0 if the point satisfies the equation of the object, -1 if the equation evaluated at the point is negative, and 1 if the equation evaluated at the point is positive. The second method when called passing another graph tool object (for example a student answer) will return 1 if the two objects are exactly the same, and 0 otherwise. A second parameter may be passed and if that parameter is 1, then the method will return 1 if the two objects are the same ignoring if the two objects are solid or dashed, and 0 otherwise. See the added POD for an example of using this in a custom checker.
534be56 to
9f91e20
Compare
|
Seems to be working now. Not sure what was going on. |
pstaabp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. By the way, huge improvement with default checkers. I remember writing up some problems and I was guessing most authors would not attempt to write one of these problem needing to write a default answer checker.
Now off to update the sample problems....
|
Two approvals, merging. |

The default checker is designed to grade the graph based on appearance. This means that if a student graphs duplicate objects, then the duplicates are ignored. Furthermore, if two objects are graphed whose only difference is that one is solid and the other is dashed (in this case the dashed object is covered by the solid object and only the solid object is really visible), then the dashed object is ignored.
Note that fills are only checked by this checker if the other graph objects are correct. This is because, without the other elements of the correct answer, there is not a valid setting to evaluate if the fill is correct or not.
The variable
$graphToolObjectCmpsis made available for use in custom checkers, and contains a hash whose keys are the types of the objects available (line, circle, parabola, fill, point, cubic, quadratic, and inverval), and whose values are methods that can be called passing one of these objects (typically a correct answer in a checker). When one of these methods is called it will return two methods. The first method when called passing a MathObject point will return 0 if the point satisfies the equation of the object, -1 if the equation evaluated at the point is negative, and 1 if the equation evaluated at the point is positive. The second method when called passing another graph tool object (for example a student answer) will return 1 if the two objects are exactly the same, and 0 otherwise. A second parameter may be passed and if that parameter is 1, then the method will return 1 if the two objects are the same ignoring if the two objects are solid or dashed, and 0 otherwise. See the added POD for an example of using this in a custom checker.