Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 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: 134 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_question_bank_renderer:: (7 methods):
  extra_horizontal_navigation()
  qtype_icon()
  render_qbank_chooser()
  qbank_chooser()
  qbank_chooser_types()
  qbank_chooser_qtype()
  qbank_chooser_title()


Class: core_question_bank_renderer  - X-Ref

This renderer outputs parts of the question bank.

extra_horizontal_navigation()   X-Ref
Display additional navigation if needed.

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_qbank_chooser(renderable $qbankchooser)   X-Ref
Render a qbank_chooser.

param: renderable $qbankchooser The chooser.
return: 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