Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
core_question\local\bank\bulk_action_base Class Reference
Inheritance diagram for core_question\local\bank\bulk_action_base:
qbank_bulkmove\bulk_move_action qbank_deletequestion\bulk_delete_action

Public Member Functions

 get_bulk_action_capabilities ()
 Get the capabilities for the bulk action.
 
 get_bulk_action_key ()
 A unique key for the bulk action, this will be used in the api to identify the action data.
 
 get_bulk_action_title ()
 Title of the bulk action.
 
 get_bulk_action_url ()
 URL of the bulk action redirect page.
 
 get_key ()
 A unique key for the bulk action, this will be used in the api to identify the action data.
 

Member Function Documentation

◆ get_bulk_action_capabilities()

core_question\local\bank\bulk_action_base::get_bulk_action_capabilities ( )

Get the capabilities for the bulk action.

The bulk actions might have some capabilities to action them as a user. This method helps to get those caps which will be used by the base view before actioning the bulk action. For ex: ['moodle/question:moveall', 'moodle/question:add'] At least one of the cap need to be true for the user to use this action.

Return values
array|null

Reimplemented in qbank_bulkmove\bulk_move_action, and qbank_deletequestion\bulk_delete_action.

◆ get_bulk_action_key()

core_question\local\bank\bulk_action_base::get_bulk_action_key ( )

A unique key for the bulk action, this will be used in the api to identify the action data.

Every bulk must have a unique key to perform the action as a part of the form post in the base view. When questions are selected, it will post according to the key its selected from the dropdown.

Return values
string
Deprecated
since Moodle 4.1
See also
get_key()
Todo
Final deprecation on Moodle 4.5 MDL-72438

◆ get_bulk_action_title()

core_question\local\bank\bulk_action_base::get_bulk_action_title ( )
abstract

Title of the bulk action.

Every bulk action will have a string to show in the list.

Return values
string

Reimplemented in qbank_bulkmove\bulk_move_action, and qbank_deletequestion\bulk_delete_action.

◆ get_bulk_action_url()

core_question\local\bank\bulk_action_base::get_bulk_action_url ( )
abstract

URL of the bulk action redirect page.

Bulk action can be performed by redirecting to a page and doing the appropriate selection and finally doing the action. The url will be url of the page where users will be redirected to select what to do with the selected questions.

Return values
moodle_url

Reimplemented in qbank_bulkmove\bulk_move_action, and qbank_deletequestion\bulk_delete_action.

◆ get_key()

core_question\local\bank\bulk_action_base::get_key ( )
abstract

A unique key for the bulk action, this will be used in the api to identify the action data.

Every bulk must have a unique key to perform the action as a part of the form post in the base view. When questions are selected, it will post according to the key its selected from the dropdown.

Return values
string

Reimplemented in qbank_bulkmove\bulk_move_action, and qbank_deletequestion\bulk_delete_action.


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