Skip to content

Parser Assignment Issues after PR #609 #644

@drgrice1

Description

@drgrice1

I think the change in pull request #609 may still need more work. Prior to that pull request problems like the following would work:

DOCUMENT();

loadMacros("PGstandard.pl", "MathObjects.pl", "PGML.pl", "parserAssignment.pl");

parser::Assignment->Allow;

$ans = Formula("x = 5");

BEGIN_PGML
Enter [`[$ans]`].

[_]{$ans}{10}
END_PGML

ENDDOCUMENT();

Prior to #609 you could enter x=5 and it would be graded as correct. Now it fails to parse and gives the warning The evaluated answer is not an answer hash : ||.

You can change Formula to Compute and this works, but it seems that it should work with both. At least it did before.

Note that if you add what was line 357 before this pull request back before the added code then this works again. That is insert
$other = $other->Package("Formula")->new($self->context,$other) unless $other->isFormula;
before the current line 360.

@drdrew42 and @dpvc: What do you think is the correct thing here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions