EduploneExam/doc responseformat.txt,NONE,1.1

Jens Klein <[email protected]>
Newsgroups gmane.comp.web.zope.eduplone.cvs
Message-ID <[email protected]>
Update of /cvsroot/eduplone/EduploneExam/doc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15859/doc

Added Files:
	responseformat.txt 
Log Message:
defines the format for processResponse


--- NEW FILE: responseformat.txt ---
Description

 This document defines the format of the user-response returned from the
question form.


How it works

 * The user fills out a form containing one or more questions.

 * The answers are submitted in a REQUEST.response object to zope.

 * A controller script distributes the answers to the according question. It 
   needs the question UID inside REQUEST.response to identify the question and
   delegate the processing.

 * The question processes REQUEST.response. It fills the an object implementing 
   IExamResponse. A question needs a two more UIDs (on top of its own) from 
   the fields in REQUEST.response to work: 
   
    * The UID of the IExamContext implementing object, 

    * the UID of the answer.

The Format Definition:

 Example 1 (text task)::

  <input type="text" 
         name="ContextUID##QuestionUID##AnswerUID" 
         value="some value">

 Example 2 (multiple choice)::

  <input type="checkbox"
         name="ContextUID##QuestionUID##Answer1UID"
         value="some value" />
  <input type="checkbox"
         name="ContextUID##QuestionUID##Answer2UID"
         value="some value" />
  <input type="checkbox"
         name="ContextUID##QuestionUID##Answer3UID"
         value="some value" />

 Example 3 (single choice)::

  <input type="radio"
         name="ContextUID##QuestionUID"
         value="Answer1UID" />
  <input type="radio"
         name="ContextUID##QuestionUID"
         value="Answer2UID" 
         checked />
  <input type="radio"
         name="ContextUID##QuestionUID"
         value="Answer3UID" />

 Example 4 (matching)::

  <select name="ContextUID##QuestionUID##Answer1UID">
    <option value="challange1"         >challange1</option>
    <option value="correct"            >correct</option>
    <option value="challange2" selected>challange2</option>
  </select>

 Explanation:

  The value(s) for example 1 and 2 will be fetched from the IExamReponse 
  implementing user-response-object. The user-repsonse-object itself will be 
  located using the IExamContext implementing context-object.

  In example 3 and 4 the value is fetched also from user-response-object. The 
  difference is that the repsonse value is just one value for whole question.




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.