Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
qbank_columnsortorder\column_manager Class Reference

Public Member Functions

 __construct ()
 Constructor for column_manager class.
 
 disable_columns (string $plugin)
 Disables columns.
 
 enable_columns (string $plugin)
 Enables columns.
 
 get_columns ()
 Get enabled columns.
 
 get_disabled_columns ()
 Get disabled columns.
 
 get_sorted_columns ($ordertosort)
 Orders columns in the question bank view according to config_plugins table 'qbank_columnsortorder' config.
 

Static Public Member Functions

static set_column_order (array $columns)
 Sets column order in the qbank_columnsortorder plugin config.
 

Public Attributes

array bool $columnorder
 Column order as set in config_plugins 'class' => 'position', ie: question_type_column => 3.
 
array bool $disabledcolumns
 Disabled columns in config_plugins table.
 

Protected Member Functions

 get_questionbank ()
 Get qbank.
 
 update_config ($enabledcolumns, $disabledcolumns)
 Updates enabled and disabled config for 'qbank_columnsortorder' plugin.
 

Member Function Documentation

◆ disable_columns()

qbank_columnsortorder\column_manager::disable_columns ( string $plugin)

Disables columns.

Parameters
string$pluginPlugin type and name ie: qbank_viewcreator.

◆ enable_columns()

qbank_columnsortorder\column_manager::enable_columns ( string $plugin)

Enables columns.

Parameters
string$pluginPlugin type and name ie: qbank_viewcreator.

◆ get_columns()

qbank_columnsortorder\column_manager::get_columns ( )

Get enabled columns.

Return values
array

◆ get_disabled_columns()

qbank_columnsortorder\column_manager::get_disabled_columns ( )

Get disabled columns.

Return values
array

◆ get_questionbank()

qbank_columnsortorder\column_manager::get_questionbank ( )
protected

Get qbank.

Return values
view

◆ get_sorted_columns()

qbank_columnsortorder\column_manager::get_sorted_columns ( $ordertosort)

Orders columns in the question bank view according to config_plugins table 'qbank_columnsortorder' config.

Parameters
array$ordertosortUnordered array of columns
Return values
array\$properorder,|$ordertosortReturns array ordered if 'qbank_columnsortorder' config exists.

◆ set_column_order()

static qbank_columnsortorder\column_manager::set_column_order ( array $columns)
static

Sets column order in the qbank_columnsortorder plugin config.

Parameters
array$columnsColumn order to set.

◆ update_config()

qbank_columnsortorder\column_manager::update_config ( $enabledcolumns,
$disabledcolumns )
protected

Updates enabled and disabled config for 'qbank_columnsortorder' plugin.

Parameters
array$enabledcolumnsEnabled columns to set.
array$disabledcolumnsDisabled columns to set.

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