Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 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: 1 time
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.

param: string $active
return: string

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

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

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

param: array $qbankheaderdata
return: bool|string

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

param: array $sortdata
return: bool|string

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

param: renderable $qbankchooser The chooser.
return: string

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

param: array $displaydata
return: bool|string

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

param: array $displaydata
return: bool|string

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

param: array $displaydata
return: bool|string

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

param: array $displaydata
return: bool|string

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!]

param: array $displaydata
return: string

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

param: array $displaydata
return: bool|string

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

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
return: string The composed HTML for the questionbank chooser

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

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

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

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
return: string The composed HTML for the question type

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

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