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

Public Member Functions

 formulation_and_controls (question_attempt $qa, question_display_options $options)
 specific_feedback (question_attempt $qa)

Protected Member Functions

 get_input_type ()
 get_input_name (question_attempt $qa, $value)
 get_input_value ($value)
 get_input_id (question_attempt $qa, $value)
 is_right (question_answer $ans)
 prompt ()
 number_html ($qnum)
 number_in_style ($num, $style)

Detailed Description

Base class for generating the bits of output common to multiple choice single and multiple questions.

Definition at line 37 of file renderer.php.


Member Function Documentation

Generate the display of the formulation part of the question. This is the area that contains the quetsion text, and the controls for students to input their answers. Some question types also embed bits of feedback, for example ticks and crosses, in this area.

Parameters:
question_attempt$qathe question attempt to display.
question_display_options$optionscontrols what should and should not be displayed.
Returns:
string HTML fragment.

Reimplemented from qtype_renderer.

Definition at line 55 of file renderer.php.

Here is the call graph for this function:

get_input_id ( question_attempt qa,
value 
) [abstract, protected]

Reimplemented in qtype_multichoice_multi_renderer, and qtype_multichoice_single_renderer.

Here is the caller graph for this function:

get_input_name ( question_attempt qa,
value 
) [abstract, protected]

Reimplemented in qtype_multichoice_multi_renderer, and qtype_multichoice_single_renderer.

Here is the caller graph for this function:

get_input_type ( ) [abstract, protected]

Reimplemented in qtype_multichoice_multi_renderer, and qtype_multichoice_single_renderer.

Here is the caller graph for this function:

get_input_value ( value) [abstract, protected]

Reimplemented in qtype_multichoice_multi_renderer, and qtype_multichoice_single_renderer.

Here is the caller graph for this function:

is_right ( question_answer ans) [abstract, protected]

Whether a choice should be considered right, wrong or partially right.

Parameters:
question_answer$ansrepresenting one of the choices.
Returns:
fload 1.0, 0.0 or something in between, respectively.

Reimplemented in qtype_multichoice_multi_renderer, and qtype_multichoice_single_renderer.

Here is the caller graph for this function:

number_html ( qnum) [protected]

Definition at line 150 of file renderer.php.

Here is the caller graph for this function:

number_in_style ( num,
style 
) [protected]
Parameters:
int$numThe number, starting at 0.
string$styleThe style to render the number in. One of the options returned by qtype_multichoice:;get_numbering_styles().
Returns:
string the number $num in the requested style.

Definition at line 160 of file renderer.php.

Here is the call graph for this function:

Here is the caller graph for this function:

prompt ( ) [abstract, protected]

Reimplemented in qtype_multichoice_multi_renderer, and qtype_multichoice_single_renderer.

Here is the caller graph for this function:

Gereate the specific feedback. This is feedback that varies accordin to the reponse the student gave.

Parameters:
question_attempt$qathe question attempt to display.
Returns:
string HTML fragment.

Reimplemented from qtype_renderer.

Definition at line 185 of file renderer.php.

Here is the call graph for this function:


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