PREP 2014 Question Authoring - Archived

Which macros to load (in general)?

Re: Which macros to load (in general)?

by Paul Pearson -
Number of replies: 0
Hi aBa,

You should probably always load and  

I would strongly encourage you to load as the last macro, because with it you can do things like course-wide customization by adding some lines of code to the [coursename]/templates/macros/ file (which you may have to create).

When I am updating an old problem in the OPL, I load and and then comment out all of the other macros that are loaded.  Then, using the Library Browser, I see if the PG file will run.  If the PG file does not run, I go back and start uncommenting macros until the PG file runs.  After a while, you get good at recognizing what features (e.g., graphing) go with which macros (e.g., and you develop a sense of what macros are likely needed to make a PG file work.  Also, pay attention to what code is being used in the PG file itself, since the code informs you which macros are going to be needed.

If you're looking for good templates in the Library, check out the FortLewis directory (which is written almost entirely by me) and should have good examples of everything except for PGML (which I only learned about last week!).  Gavin LaRose's problems in the Michigan directory are also great, but
I have noticed that, because they are a little older, they occasionally use old-style answer checkers.  There are probably other good places to look in the library (the Union directory comes to mind even though it is a bit older) that I know about as well as other good places to look in the library (John Travis's MC) that I have not yet explored.  I also recommend the Subject Area Templates and the Problem Techniques sections of the wiki:

N.B. The BEGIN_PROBLEM / END_PROBLEM stuff was just for Davide's fancy slides.

Best regards,

Paul Pearson