--- loncom/html/adm/help/tex/Custom_Response_Problem_Creation.tex 2013/06/26 08:14:55 1.1
+++ loncom/html/adm/help/tex/Custom_Response_Problem_Creation.tex 2013/07/05 18:30:40 1.2
@@ -5,22 +5,25 @@ generally discouraged, since the respons
For a single textfield, the student's answer will be in a variable \$submission. If the Custom Response has multiple textfields, the answers will be in an array
reference, and can be accessed as \$\$submission[0], \$\$submission[1], etc.
-The student answer needs to be evaluated by Perl code inside the -tag. Custom Response needs to return a standard LON-CAPA. The most common response are:
+The student answer needs to be evaluated by Perl code inside the \texttt{\textless answer\textgreater}-tag. Custom Response needs to include an algorithm that determines and returns a standard LON-CAPA response. The most common LON-CAPA responses are:
\begin{itemize}
\item EXACT\_ANS: return if solved exactly correctly
\item APPROX\_ANS: return if solved approximately
\item INCORRECT: return if not correct, uses up a try
-\item ASSIGNED\_SCORE: partial credit (also return the credit factor, e.g. return(ASSIGNED\_SCORE,0.3);)
+\item ASSIGNED\_SCORE: partial credit (also return the credit factor, \\
+e.g. return(ASSIGNED\_SCORE,0.3);)
\item SIG\_FAIL, NO\_UNIT, EXTRA\_ANSWER, MISSING\_ANSWER, BAD\_FORMULA,
WANTED\_NUMERIC, WRONG\_FORMAT: return if not correct for different reasons, does not use up a try
\end{itemize}
-The answer display is shown instead of the student response in 'show answer' mode.
+The \texttt{answerdisplay} is shown instead of the student response in 'show answer' mode after the answer date.
The following example illustrates this:
\begin{verbatim}
Accept an answer of around 90 or -90
+# This examples uses perl 'regular expressions' for string evaluation.
+# Consult a perl reference for help understanding the regular expressions.
# We do not want a vector
if ($submission=~/\,/) { return 'EXTRA_ANSWER'; }
# Need a numerical answer here