LON-CAPA Help
externalresponse is an advanced type of response tag that
implements the ability to have an external program grade a response.
It expects either a textline or textfield inside
the tag. Possible attributes are:
- url: url to submit the answer form to. It does
not need to be a LON-CAPA machine.
- answer: data to post in the form element
LONCAPA_correct_answer to the remote site.
- form: hash variable name that will be submitted
to the remote site as a HTTP form.
The form sent will consist of
- LONCAPA_student_response full text of
what the student entered in the entry field
- LONCAPA_correct_answer contents of the answer
attribute
- LONCAPA_language specified language encoding
of the requesting resource
- 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
The response of the remote server needs to be in XML as follows:
- loncapagrade: takes no attributes, but
must surround the response.
- 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 resource.partid.responseid.awarddetail.
- message: optional message to have shown to
the student.
Example:
<loncapagrade>
<awarddetail>INCORRECT</awarddetail>
<message>
A message to be shown to the students
</message>
</loncapagrade>