Diff for /loncom/html/adm/help/tex/Custom_Response_Problems.tex between versions 1.2 and 1.4

version 1.2, 2006/07/18 18:56:11 version 1.4, 2007/05/10 21:04:02
Line 3  Custom Response is a way to have a probl Line 3  Custom Response is a way to have a probl
 generally discouraged, since the responses will not be analyzable by the LON-CAPA statistics tools.  generally discouraged, since the responses will not be analyzable by the LON-CAPA statistics tools.
   
 The student answer is stored in the  The student answer is stored in the
 variable \$submission, and needs to be evaluated by Perl code inside the <answer>-tag. Custom Response needs to return a standard LON-CAPA grading code:  variable \$submission, and needs to be evaluated by Perl code inside the <answer>-tag. Custom Response needs to return a standard LON-CAPA. The most common response are:
 \begin{itemize}  \begin{itemize}
 \item EXACT\_ANS: return if solved exactly correctly  \item EXACT\_ANS: return if solved exactly correctly
 \item APPROX\_ANS: return if solved approximately  \item APPROX\_ANS: return if solved approximately
 \item INCORRECT: return if not correct, uses up a try  \item INCORRECT: return if not correct, uses up a try
 \item SIG\_FAIL, NO\_UNIT, ANS\_CNT\_NOT\_MATCH, BAD\_FORMULA,   \item SIG\_FAIL, NO\_UNIT, EXTRA\_ANSWER, MISSING\_ANSWER, BAD\_FORMULA, 
 WANTED\_NUMERIC: return if not correct for different reasons, does not use up a try  WANTED\_NUMERIC: return if not correct for different reasons, does not use up a try
 \end{itemize}  \end{itemize}
 The answer display is shown instead of the student response in 'show answer' mode.  The answer display is shown instead of the student response in 'show answer' mode.
Line 19  The following example illustrates this: Line 19  The following example illustrates this:
   <customresponse answerdisplay="something near 90 or -90">    <customresponse answerdisplay="something near 90 or -90">
     <answer type="loncapa/perl">      <answer type="loncapa/perl">
 # We do not want a vector  # We do not want a vector
 if ($submission=~/\,/) { return 'ANS_CNT_NOT_MATCH'; }  if ($submission=~/\,/) { return 'EXTRA_ANSWER'; }
 # Need a numerical answer here  # Need a numerical answer here
 if ($submission!~/^[\d\.\-\e]+$/i) { return 'WANTED_NUMERIC'; }  if ($submission!~/^[\d\.\-\e]+$/i) { return 'WANTED_NUMERIC'; }
 $difference=abs(90-abs($submission));  $difference=abs(90-abs($submission));
Line 30  return 'INCORRECT';</answer> Line 30  return 'INCORRECT';</answer>
   </customresponse>    </customresponse>
 </problem>  </problem>
 \end{verbatim}  \end{verbatim}
   
   
   Full list of possible return codes:
   \begin{itemize}
   \item EXACT\_ANS: student is exactly correct
   \item APPROX\_ANS:  student is approximately correct
   \item NO\_RESPONSE: student submitted no response
   \item MISSING\_ANSWER: student submitted some but not all parts of a response
   \item EXTRA\_ANSWER: student submitted a vector of values when a scalar was expected
   \item WANTED\_NUMERIC: expected a numeric answer and didn't get one
   \item SIG\_FAIL: incorrect number of Significant Figures
   \item UNIT\_FAIL: incorrect unit
   \item UNIT\_NOTNEEDED: Submitted a unit when one shouldn't
   \item UNIT\_INVALID\_INSTRUCTOR: the unit provided by the author of the problem is unparsable
   \item UNIT\_INVALID\_STUDENT: the unit provided by the student is unparasable
   \item UNIT\_IRRECONCIBLE: the unit from the student and the instructor are of different types
   \item NO\_UNIT: needed a unit but none was submitted
   \item BAD\_FORMULA: syntax error in submitted formula
   \item INCORRECT: answer was wrong
   \item SUBMITTED: submission wasn't graded
   \item DRAFT: submission only stored
   \item MISORDERED\_RANK: student submitted a poorly order rank response
   \item ERROR: unable to get a grade
   \item ASSIGNED\_SCORE: there is a resource.partid.responseid.awarded the real awarded should be set to the average of the individual awards
   \item TOO\_LONG: answer submission to CAPA engine longer than 500 characters
   \item INVALID\_FILETYPE: student tried to upload a file that was of an extension that was not specifically allowed 
   \item COMMA\_FAIL: answer requires the use of comma grouping and it wasn't provided or was incorrect
   
   \end{itemize}
   

Removed from v.1.2  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>