Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
This grading strategy is used by question types like shortanswer an numerical. More...
Public Member Functions | |
__construct (question_response_answer_comparer $question) | |
get_correct_answer () | |
grade (array $response) | |
Return a question answer that describes the outcome (fraction and feeback) for a particular respons. More... | |
Protected Attributes | |
question_response_answer_comparer | $question |
(presumably also a question_definition) the question we are doing the grading for. | |
This grading strategy is used by question types like shortanswer an numerical.
It gets a list of possible answers from the question, and returns the first one that matches the given response. It returns the first answer with fraction 1.0 when asked for the correct answer.
question_first_matching_answer_grading_strategy::__construct | ( | question_response_answer_comparer | $question | ) |
question_response_answer_comparer | $question | (presumably also a question_definition) the question we are doing the grading for. |
question_first_matching_answer_grading_strategy::get_correct_answer | ( | ) |
question_answer | an answer that contains the a response that would get full marks. |
Implements question_grading_strategy.
question_first_matching_answer_grading_strategy::grade | ( | array | $response | ) |
Return a question answer that describes the outcome (fraction and feeback) for a particular respons.
array | $response | the response. |
question_answer | the answer describing the outcome. |
Implements question_grading_strategy.