Moodle  2.2.1
http://www.collinsharper.com
question_first_matching_answer_grading_strategy Class Reference
Inheritance diagram for question_first_matching_answer_grading_strategy:
Collaboration diagram for question_first_matching_answer_grading_strategy:

Public Member Functions

 __construct (question_response_answer_comparer $question)
 grade (array $response)
 get_correct_answer ()

Protected Attributes

 $question

Detailed Description

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.

Definition at line 917 of file questionbase.php.


Constructor & Destructor Documentation

Parameters:
question_response_answer_comparer$question(presumably also a question_definition) the question we are doing the grading for.

Definition at line 928 of file questionbase.php.


Member Function Documentation

Returns:
question_answer an answer that contains the a response that would get full marks.

Implements question_grading_strategy.

Definition at line 942 of file questionbase.php.

Here is the call graph for this function:

grade ( array response)

Return a question answer that describes the outcome (fraction and feeback) for a particular respons.

Parameters:
array$responsethe response.
Returns:
question_answer the answer describing the outcome.

Implements question_grading_strategy.

Definition at line 932 of file questionbase.php.


Field Documentation

$question [protected]

Definition at line 922 of file questionbase.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations