|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| formulation_and_controls (question_attempt $qa, question_display_options $options) | |
| formulation_heading () | |
| clear_wrong (question_attempt $qa) | |
| feedback (question_attempt $qa, question_display_options $options) | |
| manual_comment (question_attempt $qa, question_display_options $options) | |
| head_code (question_attempt $qa) | |
Protected Member Functions | |
| specific_feedback (question_attempt $qa) | |
| num_parts_correct (question_attempt $qa) | |
| hint (question_attempt $qa, question_hint $hint) | |
| general_feedback (question_attempt $qa) | |
| correct_response (question_attempt $qa) | |
| feedback_class ($fraction) | |
| feedback_image ($fraction, $selected=true) | |
Renderer base classes for question types.
Definition at line 36 of file rendererbase.php.
| clear_wrong | ( | question_attempt $ | qa | ) |
Output hidden form fields to clear any wrong parts of the student's response.
This method will only be called if the question is in read-only mode.
| question_attempt | $qa | the question attempt to display. |
Definition at line 69 of file rendererbase.php.


| correct_response | ( | question_attempt $ | qa | ) | [protected] |
Gereate an automatic description of the correct response to this question. Not all question types can do this. If it is not possible, this method should just return an empty string.
| question_attempt | $qa | the question attempt to display. |
Reimplemented in qtype_multichoice_multi_renderer, qtype_multichoice_single_renderer, qtype_numerical_renderer, qtype_truefalse_renderer, qtype_match_renderer, qtype_shortanswer_renderer, and qtype_multianswer_renderer.
Definition at line 188 of file rendererbase.php.

| feedback | ( | question_attempt $ | qa, |
| question_display_options $ | options | ||
| ) |
Generate the display of the outcome part of the question. This is the area that contains the various forms of feedback. This function generates the content of this area belonging to the question type.
Subclasses will normally want to override the more specific methods {specific_feedback()}, {general_feedback()} and {correct_response()} that this method calls.
| question_attempt | $qa | the question attempt to display. |
| question_display_options | $options | controls what should and should not be displayed. |
Definition at line 100 of file rendererbase.php.


| feedback_class | ( | $ | fraction | ) | [protected] |
Definition at line 218 of file rendererbase.php.


| feedback_image | ( | $ | fraction, |
| $ | selected = true |
||
| ) | [protected] |
Return an appropriate icon (green tick, red cross, etc.) for a grade.
| float | $fraction | grade on a scale 0..1. |
| bool | $selected | whether to show a big or small icon. (Deprecated) |
Definition at line 228 of file rendererbase.php.


| formulation_and_controls | ( | question_attempt $ | qa, |
| question_display_options $ | options | ||
| ) |
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.
| question_attempt | $qa | the question attempt to display. |
| question_display_options | $options | controls what should and should not be displayed. |
Reimplemented in qtype_multichoice_renderer_base, qtype_multianswer_renderer, qtype_match_renderer, qtype_description_renderer, qtype_essay_renderer, qtype_shortanswer_renderer, qtype_truefalse_renderer, and qtype_numerical_renderer.
Definition at line 47 of file rendererbase.php.


In the question output there are some class="accesshide" headers to help screen-readers. This method returns the text to use for the heading above the formulation_and_controls section.
Reimplemented in qtype_description_renderer.
Definition at line 58 of file rendererbase.php.

| general_feedback | ( | question_attempt $ | qa | ) | [protected] |
Gereate the general feedback. This is feedback is shown ot all students.
| question_attempt | $qa | the question attempt to display. |
Definition at line 176 of file rendererbase.php.


| head_code | ( | question_attempt $ | qa | ) |
Return any HTML that needs to be included in the page's <head> when this question is used.
| $qa | the question attempt that will be displayed on the page. |
Definition at line 210 of file rendererbase.php.

| hint | ( | question_attempt $ | qa, |
| question_hint $ | hint | ||
| ) | [protected] |
Gereate the specific feedback. This is feedback that varies accordin to the reponse the student gave.
| question_attempt | $qa | the question attempt to display. |
Definition at line 165 of file rendererbase.php.


| manual_comment | ( | question_attempt $ | qa, |
| question_display_options $ | options | ||
| ) |
Display any extra question-type specific content that should be visible when grading, if appropriate.
| question_attempt | $qa | a question attempt. |
| question_display_options | $options | controls what should and should not be displayed. |
Reimplemented in qtype_essay_renderer.
Definition at line 200 of file rendererbase.php.

| num_parts_correct | ( | question_attempt $ | qa | ) | [protected] |
Gereate a brief statement of how many sub-parts of this question the student got right.
| question_attempt | $qa | the question attempt to display. |
Reimplemented in qtype_multichoice_multi_renderer.
Definition at line 148 of file rendererbase.php.


| specific_feedback | ( | question_attempt $ | qa | ) | [protected] |
Gereate the specific feedback. This is feedback that varies accordin to the reponse the student gave.
| question_attempt | $qa | the question attempt to display. |
Reimplemented in qtype_multichoice_renderer_base, qtype_numerical_renderer, qtype_truefalse_renderer, qtype_match_renderer, and qtype_shortanswer_renderer.
Definition at line 138 of file rendererbase.php.
