Skip to content

Convert to PGML can break macros and should not be run if PGML is being used. #2908

@somiaj

Description

@somiaj

When running the "Convert to PGML" code maintenance script, it can remove macros that were loaded breaking the problem. The script assumes that loadMacros will only add macros as a comma separated list and not other ways to create lists in perl. For example:

DOCUMENT();
loadMacros(qw{
    PGstandard.pl
    MathObjects.pl
    plots.pl
    parserPopUp.pl
    PGcourse.pl
});

BEGIN_TEXT
Problem text.
END_TEXT
ENDDOCUMENT();

Running the "Convert to PGML" script produces.

DOCUMENT();
loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');

BEGIN_PGML
Problem text.
END_PGML
ENDDOCUMENT();

All of the macros loaded by the previous problem were lost. If the problem did use any of the additional macros listed, the problem would be broken.

In addition, if a problem is already using PGML, the script should not do anything, as changing the way loading macros are loaded or other things when there is nothing to convert might cause other issues.

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