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

Public Member Functions

 is_gradable_response (array $response)
 get_right_answer_summary ()
 get_hint ($hintnumber, question_attempt $qa)
 format_hint (question_hint $hint, question_attempt $qa)

Data Fields

 $shownumcorrect = false

Protected Member Functions

 check_combined_feedback_file_access ($qa, $options, $filearea)
 check_hint_file_access ($qa, $options, $args)

Detailed Description

This class represents a question that can be graded automatically.

Definition at line 563 of file questionbase.php.


Member Function Documentation

check_combined_feedback_file_access ( qa,
options,
filearea 
) [protected]

Check a request for access to a file belonging to a combined feedback field.

Parameters:
question_attempt$qathe question attempt being displayed.
question_display_options$optionsthe options that control display of the question.
string$fileareathe name of the file area.
Returns:
bool whether access to the file should be allowed.

Definition at line 587 of file questionbase.php.

Here is the call graph for this function:

Here is the caller graph for this function:

check_hint_file_access ( qa,
options,
args 
) [protected]

Check a request for access to a file belonging to a hint.

Parameters:
question_attempt$qathe question attempt being displayed.
question_display_options$optionsthe options that control display of the question.
array$argsthe remaining bits of the file path.
Returns:
bool whether access to the file should be allowed.

Definition at line 608 of file questionbase.php.

Here is the caller graph for this function:

format_hint ( question_hint hint,
question_attempt qa 
)

Definition at line 624 of file questionbase.php.

Here is the call graph for this function:

get_hint ( hintnumber,
question_attempt qa 
)

Get one of the question hints. The question_attempt is passed in case the question type wants to do something complex. For example, the multiple choice with multiple responses question type will turn off most of the hint options if the student has selected too many opitions.

Parameters:
int$hintnumberWhich hint to display. Indexed starting from 0
question_attempt$qaThe question_attempt.

Implements question_automatically_gradable.

Reimplemented in qtype_multichoice_multi_question.

Definition at line 617 of file questionbase.php.

Generate a brief, plain-text, summary of the correct answer to this question. This is used by various reports, and can also be useful when testing. This method will return null if such a summary is not possible, or inappropriate.

Returns:
string|null a plain text summary of the right answer to this question.

Implements question_automatically_gradable.

Definition at line 572 of file questionbase.php.

Here is the call graph for this function:

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.

Parameters:
array$responseresponses, as returned by question_attempt_step::get_qt_data().
Returns:
bool whether this response can be graded.

Implements question_automatically_gradable.

Reimplemented in qtype_multichoice_multi_question, qtype_match_question, qtype_multichoice_single_question, qtype_multianswer_question, and qtype_numerical_question.

Definition at line 568 of file questionbase.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$shownumcorrect = false

Definition at line 566 of file questionbase.php.


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