Authoring Best Practices

From WeBWorK_wiki
Revision as of 15:50, 30 May 2023 by Dglin (talk | contribs) (More new stuff)
Jump to navigation Jump to search

Perl Code

In the future any problems submitted to the OPL will need to have perltidy applied to them.

Macros

  • Within the problem loadmacros should only be called once, with all of the necessary macros listed one per line.
  • Any macros that are not used by the problem should be removed when copying code from another problem.
  • The first macro loaded should be PGstandard.pl, which loads the following macros, so none of them should be explicitly loaded.
    • PG.pl
    • PGbasicmacros.pl
    • PGanswermacros.pl
    • PGauxiliaryFunctions.pl
    • customizeLaTeX.pl
  • The last macro loaded should be PGcourse.pl.

MathObjects and PGML

Obsolete Techniques

Obsolete Technique Current Technique
Old answer checkers (e.g. num_cmp, fun_cmp, str_cmp) MathObjects answer checkers
Old text processing (e.g. BEGIN_TEXT/END_TEXT, BEGIN_SOLUTION/END_SOLUTION, BEGIN_HINT/END_HINT PGML: BEGIN_PGML_SOLUTION/END_PGML_SOLUTION, BEGIN_PGML_HINT/END_PGML_HINT