Skip to content

Provide support for MathObject in evaluation points #7

@SchmidtNikolas

Description

@SchmidtNikolas

List objects cannot be marked as ordered for answer-checking, evaluation points cannot be specified for Formula objects. Evaluation points seem to be necessary for formulas involving factorials. A nice way to fix this is by replacing normal GUIWorK variable declarations with ones such as the following, which effectively limit WeBWorK's equality testing on these variables to integer values within a limited range, e.g.:

Context()->variables->add(r=>['Real', limits=>[1,20],

resolution=>1]);

Context()->variables->add(n=>['Real', limits=>[1,20],

resolution=>1]);

Alternatively, evaluation point syntax can be used, assuming only one real variable n is declared in the variable Context:

$f = Formula("5n!");
$f->{test_points} = [[0],[1],[2],[3],[4]];

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions