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


Public Member Functions | |
| get_renderer (moodle_page $page) | |
| get_min_fraction () | |
| get_expected_data () | |
| summarise_response (array $response) | |
| classify_response (array $response) | |
| get_correct_response () | |
| is_same_response (array $prevresponse, array $newresponse) | |
| is_complete_response (array $response) | |
| is_gradable_response (array $response) | |
| grade_response (array $response) | |
| get_validation_error (array $response) | |
| get_response (question_attempt $qa) | |
| is_choice_selected ($response, $value) | |
Represents a multiple choice question where only one choice should be selected.
Definition at line 143 of file question.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(). |
Reimplemented from question_with_responses.
Definition at line 176 of file question.php.

What data would need to be submitted to get this question correct. If there is more than one correct answer, this method should just return one possibility. If it is not possible to compute a correct response, this method should return null.
Reimplemented from question_definition.
Definition at line 187 of file question.php.

Return an array of the question type variables that could be submitted as part of a question of this type, with their types, so they can be properly cleaned.
Reimplemented from question_definition.
Definition at line 162 of file question.php.
| get_min_fraction | ( | ) |
Some questions can return a negative mark if the student gets it wrong.
This method returns the lowest mark the question can return, on the fraction scale. that is, where the maximum possible mark is 1.0.
Reimplemented from question_definition.
Definition at line 148 of file question.php.
| get_renderer | ( | moodle_page $ | page | ) |
| moodle_page | the page we are outputting to. |
Reimplemented from question_definition.
Definition at line 144 of file question.php.

| get_response | ( | question_attempt $ | qa | ) |
Reimplemented from qtype_multichoice_base.
Definition at line 226 of file question.php.

| get_validation_error | ( | array $ | response | ) |
In situations where is_gradable_response() returns false, this method should generate a description of what the problem is.
Implements question_automatically_gradable.
Definition at line 219 of file question.php.

| grade_response | ( | array $ | response | ) |
Grade a response to the question, returning a fraction between get_min_fraction() and 1.0, and the corresponding question_state right, partial or wrong.
| array | $response | responses, as returned by question_attempt_step::get_qt_data(). |
Implements question_automatically_gradable.
Definition at line 209 of file question.php.

| is_choice_selected | ( | $ | response, |
| $ | value | ||
| ) |
Reimplemented from qtype_multichoice_base.
Definition at line 230 of file question.php.
| 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(). |
Implements question_manually_gradable.
Definition at line 201 of file question.php.

| is_gradable_response | ( | array $ | response | ) |
Use by many of the behaviours to determine whether the student has provided enough of an answer for the question to be graded automatically, or whether it must be considered aborted.
| array | $response | responses, as returned by question_attempt_step::get_qt_data(). |
Reimplemented from question_graded_automatically.
Definition at line 205 of file question.php.


| 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. |
Implements question_manually_gradable.
Definition at line 197 of file question.php.

| summarise_response | ( | array $ | response | ) |
Produce a plain text summary of a response.
| $response | a response, as might be passed to grade_response(). |
Implements question_manually_gradable.
Definition at line 166 of file question.php.
