Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 403]

Renderers for outputting parts of the question bank.

Copyright: 2011 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 230 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_question_bank_renderer  - X-Ref

This renderer outputs parts of the question bank.

extra_horizontal_navigation($active = null)   X-Ref
Display additional navigation if needed.

return: string
param: string $active

qtype_icon($qtype)   X-Ref
Output the icon for a question type.

return: string HTML fragment.
param: string $qtype the question type.

render_column_header($qbankheaderdata)   X-Ref
Render the column headers.

return: bool|string
param: array $qbankheaderdata

render_column_sort($sortdata)   X-Ref
Render the column sort elements.

return: bool|string
param: array $sortdata

render_qbank_chooser(renderable $qbankchooser)   X-Ref
Render a qbank_chooser.

return: string
param: renderable $qbankchooser The chooser.

render_category_condition($displaydata)   X-Ref
Render category condition.

return: bool|string
param: array $displaydata

render_category_condition_advanced($displaydata)   X-Ref
Render category condition advanced.

return: bool|string
param: array $displaydata

render_hidden_condition_advanced($displaydata)   X-Ref
Render hidden condition advanced.

return: bool|string
param: array $displaydata

render_question_pagination($displaydata)   X-Ref
Render question pagination.

return: bool|string
param: array $displaydata

render_showtext_checkbox($displaydata)   X-Ref
Render the showtext option.

It's not a checkbox any more! [Name your API after the purpose, not the implementation!]

return: string
param: array $displaydata

render_bulk_actions_ui($displaydata)   X-Ref
Render bulk actions ui.

return: bool|string
param: array $displaydata

qbank_chooser($real, $fake, $course, $hiddenparams)   X-Ref
Build the HTML for the question chooser javascript popup.

return: string The composed HTML for the questionbank chooser
param: array $real A set of real question types
param: array $fake A set of fake question types
param: object $course The course that will be displayed
param: array $hiddenparams Any hidden parameters to add to the form

qbank_chooser_types($types)   X-Ref
Build the HTML for a specified set of question types.

return: string The composed HTML for the module
param: array $types A set of question types as used by the qbank_chooser_module function

qbank_chooser_qtype($qtype, $classes = array()   X-Ref
Return the HTML for the specified question type, adding any required classes.

return: string The composed HTML for the question type
param: object $qtype An object containing the title, and link. An icon, and help text may optionally be specified.
param: array $classes Additional classes to add to the encompassing div element

qbank_chooser_title($title, $identifier = null)   X-Ref
Return the title for the question bank chooser.

return: string The composed HTML for the title
param: string $title The language string identifier
param: string $identifier The component identifier