Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | List of all members
question_response_answer_comparer Interface Reference

This interface defines the methods that a question_definition must implement if it is to be graded by the question_first_matching_answer_grading_strategy. More...

Inheritance diagram for question_response_answer_comparer:
qtype_shortanswer_question

Public Member Functions

 compare_response_with_answer (array $response, question_answer $answer)
 
 get_answers ()
 

Detailed Description

This interface defines the methods that a question_definition must implement if it is to be graded by the question_first_matching_answer_grading_strategy.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ compare_response_with_answer()

question_response_answer_comparer::compare_response_with_answer ( array  $response,
question_answer  $answer 
)
Parameters
array$responsethe response.
question_answer$answeran answer.
Return values
boolwhether the response matches the answer.

Implemented in qtype_shortanswer_question.

◆ get_answers()

question_response_answer_comparer::get_answers ( )
Return values
arrayof question_answers.

Implemented in qtype_shortanswer_question.


The documentation for this interface was generated from the following file: