Skip to content

Bug when a matrix Math Object is reused as an answer #1002

Open
@Alex-Jordan

Description

@Alex-Jordan

Here is an issue, similar to issues I've seen in the past in that to demonstrate this, a Math Object gets reused as an answer.

In 2.18 and also develop, consider:

DOCUMENT();
loadMacros(qw(PGstandard.pl PGML.pl));
Context("Matrix");
$A = Matrix([-1,0],[0,-1]);

BEGIN_PGML
[`[$A]={}`][_]*{$A}{5}

[`[$A]={}`][_]*{$A}{5}
END_PGML

ENDDOCUMENT();

Both answer fields want the negative of the identity matrix entered. If you enter [[1,0],[0,1]] in the first answer (which is incorrect) and [[-1,0],[0,-1]] in the second answer (which is correct), as far as scoring goes, the right thing happens.

But the "answer preview" and "entered" fields in the results table (2.18) or answer info popover (develop) show that you entered [[1,0],[0,-1]] for that first answer, which is not what you typed into either answer array.

Screenshot 2024-02-03 at 5 32 21 PM

I am unsure if the issue can be demonstrated with a more minimal example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions