## Forum archive 2000-2006

### Michael Gage - Modifications needed to use CAPA problems

by Arnold Pizer -
Number of replies: 0
 Modifications needed to use CAPA problems topic started 5/11/2000; 2:59:30 PMlast post 5/11/2000; 2:59:30 PM
Michael Gage - Modifications needed to use CAPA problems
5/11/2000; 2:59:30 PM (reads: 3483, responses: 0)

### Adapting CAPA problems for use with WeBWorK

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 gage@math.rochester.edu for a copy. (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 the following lines must be added to the webworkCourse.ph file:

  ## LOCAL CUSTOMIZATION *  # CAPA modifications # Define some additional directories for use by translated CAPA problems.$PG_environment{'CAPA_Tools'} = "${macroDirectory}CAPA_Tools/";  $PG_environment{'CAPA_MCTools'} = "${macroDirectory}CAPA_MCTools/";   $PG_environment{'CAPA_Graphics_URL'} = "${htmlURL}CAPA_Graphics/";   $PG_environment{'CAPA_GraphicsDirectory'} = "${htmlDirectory}CAPA_Graphics/";# You may need to change the addresses above depending on#where you store the CAPA graphics and macros.

## The html directory for this course needs to contain a file called CAPA_Graphics
## which either is a directory of graphics or links to a directory of graphics for CAPA.
##

## The macroDirectory or its backup the courseScripts directory
## 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 macroDirectory or courseScripts directory must
## contain the file PG_CAPAmacros.pl (distributed with WeBWorK).

# end CAPA modifications

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\usepackage{epsf}

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

\newenvironment{choicelist}
{\begin{list}{}
{\setlength{\rightmargin}{0in}\setlength{\leftmargin}{0.13in}
\setlength{\topsep}{0.05in}\setlength{\itemsep}{0.022in}
\setlength{\parsep}{0in}\setlength{\belowdisplayskip}{0.04in}
\setlength{\abovedisplayskip}{0.05in}
\setlength{\abovedisplayshortskip}{-0.04in}
\setlength{\belowdisplayshortskip}{0.04in}}
}
{\end{list}}

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

<| Post or View Comments |>