Authoring Best Practices

From WeBWorK_wiki
Revision as of 11:55, 30 May 2023 by Dglin (talk | contribs) (Initial commit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

  • Any newly authored problem should use MathObjects and PGML
Obsolete Technique Current Technique
Old answer checkers (e.g. `num_cmp`, `fun_cmp`, `str_cmp` MathObjects answer checkers
`BEGIN_TEXT`/`END_TEXT` `BEGIN_PGML`/`END_PGML`