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 401 and 403]

(no description)

File Size: 253 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

column_manager:: (9 methods):
  __construct()
  set_column_order()
  get_questionbank()
  get_columns()
  get_disabled_columns()
  update_config()
  enable_columns()
  disable_columns()
  get_sorted_columns()


Class: column_manager  - X-Ref

Class column_manager responsible for loading and saving order to the config setting.

__construct()   X-Ref
Constructor for column_manager class.


set_column_order(array $columns)   X-Ref
Sets column order in the qbank_columnsortorder plugin config.

param: array $columns Column order to set.

get_questionbank()   X-Ref
Get qbank.

return: view

get_columns()   X-Ref
Get enabled columns.

return: array

get_disabled_columns()   X-Ref
Get disabled columns.

return: array

update_config($enabledcolumns, $disabledcolumns)   X-Ref
Updates enabled and disabled config for 'qbank_columnsortorder' plugin.

param: array $enabledcolumns Enabled columns to set.
param: array $disabledcolumns Disabled columns to set.

enable_columns(string $plugin)   X-Ref
Enables columns.

param: string $plugin Plugin type and name ie: qbank_viewcreator.

disable_columns(string $plugin)   X-Ref
Disables columns.

param: string $plugin Plugin type and name ie: qbank_viewcreator.

get_sorted_columns($ordertosort)   X-Ref
Orders columns in the question bank view according to config_plugins table 'qbank_columnsortorder' config.

param: array $ordertosort Unordered array of columns
return: array $properorder|$ordertosort Returns array ordered if 'qbank_columnsortorder' config exists.