|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| is_complete_response (array $response) | |
| is_same_response (array $prevresponse, array $newresponse) | |
| summarise_response (array $response) | |
| classify_response (array $response) | |
Interface that a question_definition must implement to be usable by the manual graded behaviour.
Definition at line 384 of file questionbase.php.
| classify_response | ( | array $ | response | ) |
Categorise the student's response according to the categories defined by get_possible_responses.
| $response | a response, as might be passed to grade_response(). |
Implemented in question_graded_by_strategy, question_with_responses, qtype_multichoice_multi_question, qtype_numerical_question, qtype_multichoice_single_question, qtype_match_question, qtype_missingtype_question, and qtype_truefalse_question.
| is_complete_response | ( | array $ | response | ) |
Used by many of the behaviours, to work out whether the student's response to the question is complete. That is, whether the question attempt should move to the COMPLETE or INCOMPLETE state.
| array | $response | responses, as returned by question_attempt_step::get_qt_data(). |
Implemented in qtype_multichoice_multi_question, qtype_multichoice_single_question, qtype_match_question, qtype_multianswer_question, qtype_numerical_question, qtype_essay_question, qtype_truefalse_question, qtype_shortanswer_question, and qtype_missingtype_question.

| is_same_response | ( | array $ | prevresponse, |
| array $ | newresponse | ||
| ) |
Use by many of the behaviours to determine whether the student's response has changed. This is normally used to determine that a new set of responses can safely be discarded.
| array | $prevresponse | the responses previously recorded for this question, as returned by question_attempt_step::get_qt_data() |
| array | $newresponse | the new responses, in the same format. |
Implemented in qtype_multichoice_multi_question, qtype_match_question, qtype_multichoice_single_question, qtype_multianswer_question, qtype_numerical_question, qtype_essay_question, qtype_truefalse_question, qtype_shortanswer_question, and qtype_missingtype_question.
| summarise_response | ( | array $ | response | ) |
Produce a plain text summary of a response.
| $response | a response, as might be passed to grade_response(). |
Implemented in qtype_multichoice_multi_question, qtype_multianswer_question, qtype_multichoice_single_question, qtype_match_question, qtype_numerical_question, qtype_missingtype_question, qtype_essay_question, qtype_shortanswer_question, and qtype_truefalse_question.
