Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
mod_quiz\output\question_chooser Class Reference

The question_chooser renderable class. More...

Inheritance diagram for mod_quiz\output\question_chooser:
qbank_editquestion\qbank_chooser core\output\chooser renderable templatable

Public Member Functions

 add_param ($name, $value, $id=null)
 Add a parameter to submit with the form.
 
 export_for_template (renderer_base $output)
 Export for template.
 
 set_instructions (lang_string $value)
 Set the chooser instructions.
 
 set_method ($value)
 Set the form method.
 

Static Public Member Functions

static get ($course, $hiddenparams, array $allowedqtypes=null)
 Get an instance of the question bank chooser.
 

Public Attributes

moodle_url $actionurl
 The form action URL.
 
lang_string $instructions
 The instructions to display.
 
string $method = 'post'
 The form method.
 
string $paramname
 The name of the parameter for the items value.
 
array $params = []
 The list of hidden parameters.
 
chooser_section[] $sections
 The sections.
 
lang_string $title
 The chooser title.
 

Detailed Description

The question_chooser renderable class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ add_param()

core\output\chooser::add_param ( $name,
$value,
$id = null )
inherited

Add a parameter to submit with the form.

Parameters
string$nameThe parameter name.
string$valueThe parameter value.
string$idThe parameter ID.

◆ export_for_template()

core\output\chooser::export_for_template ( renderer_base $output)
inherited

Export for template.

Parameters
renderer_baseThe renderer.
Return values
stdClass

Implements templatable.

◆ get()

static qbank_editquestion\qbank_chooser::get ( $course,
$hiddenparams,
array $allowedqtypes = null )
staticinherited

Get an instance of the question bank chooser.

Parameters
stdClass$courseThe course.
array$hiddenparamsHidden parameters.
array | null$allowedqtypesAllowed question types.
Return values
qbank_chooser

◆ set_instructions()

core\output\chooser::set_instructions ( lang_string $value)
inherited

Set the chooser instructions.

Parameters
lang_string$valueThe instructions.

◆ set_method()

core\output\chooser::set_method ( $value)
inherited

Set the form method.

Parameters
string$valueThe method.

Member Data Documentation

◆ $params

array core\output\chooser::$params = []
inherited

The list of hidden parameters.

See self::add_param.


The documentation for this class was generated from the following file: