Converting CAPA problems for use with WeBWorK

From WeBWorK_wiki
Revision as of 03:08, 1 March 2008 by Sam (talk | contribs)
Jump to navigation Jump to search

First you will need to translate the original CAPA problems into the PG language. We have a perl script which will do 95% of the translation automatically. Write for a copy. (N.B.: Some assembly required.) You must already own the CAPA problems, since we cannot distribute them. Once translated the CAPA problems are placed set subdirectories in the templates directory as usual.

The translated copies require some special runtime macros and in order to access the macros. Verify that the following lines are set in global.conf:

# Locations of CAPA resources. (Only necessary if you need to use converted CAPA
# problems.)
$pg{specialPGEnvironmentVars}{CAPA_Tools}             = "$courseDirs{macros}/CAPA_Tools/", 
$pg{specialPGEnvironmentVars}{CAPA_MCTools}           = "$courseDirs{macros}/CAPA_MCTools/",  
$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", 
$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL}      = "$courseURLs{html}/CAPA_Graphics/",   

The html directory for the course needs to contain an entry called CAPA_Graphics which either is a directory of graphics or links to a directory of graphics for CAPA.

The templates/macros directory for the course must contain the subdirectories CAPA_Tools and CAPA_MCTools and their contents or else it must contain links to those directories. (Forgetting this link is the most common of the difficulties encountered when starting a CAPA course.)

Finally, the templates/macros directory for the course must contain the file

You also need to make some changes to the texSetPreamble.tex file in order to provide tex macros used routinely by CAPA problems. Here are the additions that are needed:

% capa graphics

%capa tex macros
\newcommand{\capa}{{\sl C\kern-.10em\raise-.00ex\hbox{\rm A}\kern-.22em%
	{\sl P}\kern-.14em\kern-.01em{\rm A}}}


You may also wish to adjust some other parameters to adjust the output of the printed problem sets.