Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Switch to a better extension system for the GraphTool.
For JavaScript instead of piecing together the parts of the class definition, use a function that returns the class definition directly. This has the advantage of being able to use
super
directly to access methods of the parent class, and is just much easier to work with.All of the graph objects and graph tools are now in separate files (except the SelectTool and SolidDashTool which are core functionality).
For Perl, all graph objects are packages that derive from the
GraphTool::GraphObject
package instead of the previous method of defining cmp and tikz subroutines in a hash. A mapping from the string identifier to the package is maintained and used to construct the correct perl object for a graph tool object. There is a compatibility layer for objects added the old way.Furthermore this take the Perl package approach further and the
GraphTool::GraphObject
package derives from theValue::List
package. This means they are MathObjects. This makes things much simpler when writing a custom checker. The elements of the correct and student answer lists in the list_checker are all objects that derive from aGraphTool::GraphObject
(which derives from a Value::List). See the new POD on CUSTOM CHECKERS for details.