File:  [LON-CAPA] / loncom / html / adm / help / tex / Authoring_ExternalResponse.tex
Revision 1.3: download - view: text, annotated - select for diffs
Tue Sep 11 19:21:57 2007 UTC (16 years, 9 months ago) by albertel
Branches: MAIN
CVS tags: version_2_9_X, version_2_9_99_0, version_2_9_1, version_2_9_0, version_2_8_X, version_2_8_99_1, version_2_8_99_0, version_2_8_2, version_2_8_1, version_2_8_0, version_2_7_X, version_2_7_99_1, version_2_7_99_0, version_2_7_1, version_2_7_0, version_2_6_X, version_2_6_99_1, version_2_6_99_0, version_2_6_3, version_2_6_2, version_2_6_1, version_2_6_0, version_2_5_99_1, version_2_5_99_0, version_2_12_X, version_2_11_X, version_2_11_5, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, version_2_11_1, version_2_11_0_RC3, version_2_11_0_RC2, version_2_11_0_RC1, version_2_11_0, version_2_10_X, version_2_10_1, version_2_10_0_RC2, version_2_10_0_RC1, version_2_10_0, loncapaMITrelate_1, language_hyphenation_merge, language_hyphenation, bz6209-base, bz6209, bz5969, bz2851, PRINT_INCOMPLETE_base, PRINT_INCOMPLETE, HEAD, GCI_3, GCI_2, GCI_1, BZ5971-printing-apage, BZ5434-fox, BZ4492-merge, BZ4492-feature_horizontal_radioresponse
- BUG#5419 - fix the documentation of externalresponse
           - add more information about what is POSTed

\label{Authoring_ExternalResponse}


\textbf{externalresponse} is an advanced type of response tag that
implements the ability to have an external program grade a response.
It expects either a \textbf{textline} or \textbf{textfield} inside
the tag. Possible attributes are:

\begin{itemize}
\item \textbf{url}\index{url}: url to submit the answer form to. It does
not need to be a LON-CAPA machine.
\item \textbf{answer}\index{answer}: data to post in the form element 
\texttt{LONCAPA\_correct\_answer} to the remote site.
\item \textbf{form}\index{form}: hash variable name that will be submitted
to the remote site as a HTTP form.
\end{itemize}

The form sent will consist of
\begin{itemize}
\item \textbf{LONCAPA\_student\_response} full text of
what the student entered in the entry field
\item \textbf{LONCAPA\_correct\_answer} contents of the answer
attribute
\item \textbf{LONCAPA\_language} specified language encoding
of the requesting resource
\item \textbf{all items in the form attribute} if any of these clash with the
above, the above values will overwite the value in the form attribute
\end{itemize}

The response of the remote server needs to be in XML as follows: 

\begin{itemize}
\item \textbf{loncapagrade}\index{loncapagrade}: takes no attributes, but
must surround the response.
\item \textbf{awarddetail}\index{awarddetail}: required. The delimited text
inside must be one of the detailed results that appears in the data
storage documentation. CVS:loncapa/doc/homework/datastorage, look
for \textbf{resource.partid.responseid.awarddetail}.
\item \textbf{message}\index{message}: optional message to have shown to
the student.
\end{itemize}
Example: \begin{verbatim} <loncapagrade>
    <awarddetail>INCORRECT</awarddetail>
    <message>
A message to be shown to the students
    </message>
</loncapagrade>
\end{verbatim}

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