Skip to content
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

PG.pl uses the round function without explicitly loading a package that contains it. #2565

Open
dlglin opened this issue Sep 5, 2024 · 0 comments

Comments

@dlglin
Copy link
Member

dlglin commented Sep 5, 2024

Here is a MWE:

DOCUMENT();

loadMacros(
    "PG.pl",
    "PGbasicmacros.pl",
    "PGML.pl",
);

$ans = List("1,2");

BEGIN_PGML
Enter [`1,2`]: [_]{$ans}
END_PGML
ENDDOCUMENT();

Enter "1" in the answer blank and you get the following warning message, and the feedback is not shown for the answer.

ERRORS from post processing PG text:
Undefined subroutine &main::round called at [PG]/macros/PG.pl line 1097

This is because the round function is defined in PGauxiliaryFunctions.pl, which is not loaded by this problem.

This could be solved by having PG.pl load PGauxiliaryFunctions.pl, but it seems wrong to have the core PG macro depend on other macro files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant