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


This renderer controls the overall output of questions. It works with a qbehaviour_renderer and a qtype_renderer to output the type-specific bits. The main entry point is the question() method.
Definition at line 38 of file renderer.php.
| add_part_heading | ( | $ | heading, |
| $ | content | ||
| ) | [protected] |
Add an invisible heading like 'question text', 'feebdack' at the top of a section's contents, but only if the section has some content.
| string | $heading | the heading to add. |
| string | $content | the content of the section. |
Definition at line 151 of file renderer.php.


| edit_question_link | ( | question_attempt $ | qa, |
| question_display_options $ | options | ||
| ) | [protected] |
Definition at line 271 of file renderer.php.


| formulation | ( | question_attempt $ | qa, |
| qbehaviour_renderer $ | behaviouroutput, | ||
| qtype_renderer $ | qtoutput, | ||
| question_display_options $ | options | ||
| ) | [protected] |
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 feedback, for example ticks and crosses, in this area.
| question_attempt | $qa | the question attempt to display. |
| qbehaviour_renderer | $behaviouroutput | the renderer to output the behaviour specific parts. |
| qtype_renderer | $qtoutput | the renderer to output the question type specific parts. |
| question_display_options | $options | controls what should and should not be displayed. |
Definition at line 307 of file renderer.php.


| get_flag_html | ( | $ | flagged, |
| $ | id = '' |
||
| ) | [protected] |
Work out the actual img tag needed for the flag
| bool | $flagged | whether the question is currently flagged. |
| string | $id | an id to be added as an attribute to the img (optional). |
Definition at line 249 of file renderer.php.


| get_page | ( | ) |
| info | ( | question_attempt $ | qa, |
| qbehaviour_renderer $ | behaviouroutput, | ||
| qtype_renderer $ | qtoutput, | ||
| question_display_options $ | options, | ||
| $ | number | ||
| ) | [protected] |
Generate the information bit of the question display that contains the metadata like the question number, current state, and mark.
| question_attempt | $qa | the question attempt to display. |
| qbehaviour_renderer | $behaviouroutput | the renderer to output the behaviour specific parts. |
| qtype_renderer | $qtoutput | the renderer to output the question type specific parts. |
| question_display_options | $options | controls what should and should not be displayed. |
| string | null | $number | The question number to display. 'i' is a special value that gets displayed as Information. Null means no number is displayed. |
Definition at line 113 of file renderer.php.


| manual_comment | ( | question_attempt $ | qa, |
| qbehaviour_renderer $ | behaviouroutput, | ||
| qtype_renderer $ | qtoutput, | ||
| question_display_options $ | options | ||
| ) | [protected] |
Definition at line 345 of file renderer.php.


| mark_summary | ( | question_attempt $ | qa, |
| question_display_options $ | options | ||
| ) | [protected] |
Generate the display of the marks for this question.
| question_attempt | $qa | the question attempt to display. |
| question_display_options | $options | controls what should and should not be displayed. |
Definition at line 179 of file renderer.php.


| number | ( | $ | number | ) | [protected] |
Generate the display of the question number.
| string | null | $number | The question number to display. 'i' is a special value that gets displayed as Information. Null means no number is displayed. |
Definition at line 130 of file renderer.php.


| outcome | ( | question_attempt $ | qa, |
| qbehaviour_renderer $ | behaviouroutput, | ||
| qtype_renderer $ | qtoutput, | ||
| question_display_options $ | options | ||
| ) | [protected] |
Generate the display of the outcome part of the question. This is the area that contains the various forms of feedback.
| question_attempt | $qa | the question attempt to display. |
| qbehaviour_renderer | $behaviouroutput | the renderer to output the behaviour specific parts. |
| qtype_renderer | $qtoutput | the renderer to output the question type specific parts. |
| question_display_options | $options | controls what should and should not be displayed. |
Definition at line 335 of file renderer.php.


| question | ( | question_attempt $ | qa, |
| qbehaviour_renderer $ | behaviouroutput, | ||
| qtype_renderer $ | qtoutput, | ||
| question_display_options $ | options, | ||
| $ | number | ||
| ) |
Generate the display of a question in a particular state, and with certain display options. Normally you do not call this method directly. Intsead you call question_usage_by_activity::render_question() which will call this method with appropriate arguments.
| question_attempt | $qa | the question attempt to display. |
| qbehaviour_renderer | $behaviouroutput | the renderer to output the behaviour specific parts. |
| qtype_renderer | $qtoutput | the renderer to output the question type specific parts. |
| question_display_options | $options | controls what should and should not be displayed. |
| string | null | $number | The question number to display. 'i' is a special value that gets displayed as Information. Null means no number is displayed. |
Definition at line 59 of file renderer.php.


| question_flag | ( | question_attempt $ | qa, |
| $ | flagsoption | ||
| ) | [protected] |
Render the question flag, assuming $flagsoption allows it.
| question_attempt | $qa | the question attempt to display. |
| int | $flagsoption | the option that says whether flags should be displayed. |
Definition at line 208 of file renderer.php.


| response_history | ( | question_attempt $ | qa, |
| qbehaviour_renderer $ | behaviouroutput, | ||
| qtype_renderer $ | qtoutput, | ||
| question_display_options $ | options | ||
| ) | [protected] |
Generate the display of the response history part of the question. This is the table showing all the steps the question has been through.
| question_attempt | $qa | the question attempt to display. |
| qbehaviour_renderer | $behaviouroutput | the renderer to output the behaviour specific parts. |
| qtype_renderer | $qtoutput | the renderer to output the question type specific parts. |
| question_display_options | $options | controls what should and should not be displayed. |
Definition at line 363 of file renderer.php.


| status | ( | question_attempt $ | qa, |
| qbehaviour_renderer $ | behaviouroutput, | ||
| question_display_options $ | options | ||
| ) | [protected] |
Generate the display of the status line that gives the current state of the question.
| question_attempt | $qa | the question attempt to display. |
| qbehaviour_renderer | $behaviouroutput | the renderer to output the behaviour specific parts. |
| question_display_options | $options | controls what should and should not be displayed. |
Definition at line 167 of file renderer.php.

