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


Public Member Functions | |
| __construct (question_grading_strategy $strategy) | |
| get_correct_response () | |
| get_matching_answer (array $response) | |
| get_correct_answer () | |
| grade_response (array $response) | |
| classify_response (array $response) | |
Protected Attributes | |
| $gradingstrategy | |
This class represents a question that can be graded automatically by using a question_grading_strategy.
Definition at line 659 of file questionbase.php.
| __construct | ( | question_grading_strategy $ | strategy | ) |
| question_grading_strategy | $strategy | the strategy to use for grading. |
Definition at line 664 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(). |
Reimplemented from question_with_responses.
Definition at line 706 of file questionbase.php.

Definition at line 692 of file questionbase.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 669 of file questionbase.php.

| get_matching_answer | ( | array $ | response | ) |
Get an answer that contains the feedback and fraction that should be awarded for this resonse.
| array | $response | a response. |
Definition at line 684 of file questionbase.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 696 of file questionbase.php.

$gradingstrategy [protected] |
Definition at line 661 of file questionbase.php.