--- loncom/html/adm/help/tex/Developer_Tutorial.tex 2004/05/14 14:56:59 1.4 +++ loncom/html/adm/help/tex/Developer_Tutorial.tex 2014/04/25 16:02:41 1.7 @@ -1,3 +1,5 @@ +\label{Developer_Tutorial} + \section{Adding a Handler to LON-CAPA} In this section, we will add a brand new {}``handler'' to LON-CAPA. @@ -254,7 +256,7 @@ double check the entry to make sure it i it is typed correctly, and that all the lines are present. If it is still incorrect, please ask for help on the \texttt{lon-capa-dev@mail.lon-capa.org} list, including a copy of your \texttt{loncapa\_apache.conf} file -in the email; either something is wrong that is beyond the scope of +in the e-mail; either something is wrong that is beyond the scope of this document(other system configuration issues) or you really can't find the error. @@ -279,7 +281,7 @@ help you out here. But I do know the cod as a last resort try to figure out what is different. If you are absolutely stumped, please ask for help on the \texttt{lon-capa-dev@mail.lon-capa.org} list, including a copy of your \texttt{lontutorial.pm} file in the -email; either something is wrong that is beyond the scope of this +e-mail; either something is wrong that is beyond the scope of this document (other system configuration issues) or you really can't find the error. @@ -361,7 +363,7 @@ To send back a proper HTTP response, add ~~~~if~(\$r->header\_only)~\{ -~~~~~~~~if~(\$ENV\{'browser.mathml'\})~\{ +~~~~~~~~if~(\$env\{'browser.mathml'\})~\{ ~~~~~~~~~~~~\$r->content\_type('text/xml'); @@ -379,7 +381,7 @@ To send back a proper HTTP response, add ~~~~\#~Send~header,~don't~cache~this~page -~~~~if~(\$ENV\{'browser.mathml'\})~\{ +~~~~if~(\$env\{'browser.mathml'\})~\{ ~~~~~~~~\$r->content\_type('text/xml'); @@ -451,7 +453,7 @@ use~Apache::lonnavmaps; Remove the {}``Hello world!'' line and replace it with this: \begin{lyxcode} -\$ENV\{'form.condition'\}~=~1; +\$env\{'form.condition'\}~=~1; my~\$renderArgs~=~\{~'cols'~=>~{[}Apache::lonnavmaps::resource{]}, @@ -468,11 +470,11 @@ Line by line: contains routines that help render navmaps. For more information, see later in this manual or type \texttt{man Apache::lonnavmaps}. This ensures these routines are loaded into memory. -\item \texttt{\textbf{\$ENV\{'form.condition'\} = 1;}}: This is an an argument +\item \texttt{\textbf{\$env\{'form.condition'\} = 1;}}: This is an an argument being passed to the Apache::lonnavmaps::render routine in a rather unorthodox way. This will cause the navmap to render all of the resources, by default, except for what we explicitly exclude. Since we're not -going to exclude anything (which we would do with \texttt{\$ENV\{'form.filter'\}}), +going to exclude anything (which we would do with \texttt{\$env\{'form.filter'\}}), all resources will be shown. \item \texttt{\textbf{my \$renderArgs\ldots{}\$r\};}}: Since the \texttt{render} routine takes a \emph{lot} of arguments, the \texttt{render} routine @@ -522,7 +524,7 @@ In doing this, we'll learn: The first thing we need to do to accomplish this is to add an HTML form to the screen so we have something to submit. Just above the -\texttt{\$ENV\{'form.condition'\}} line, add the following: +\texttt{\$env\{'form.condition'\}} line, add the following: \begin{lyxcode} \$r->print(\char`\"{}