|
static | execute (int $contextid, string $search='', array $requiredcapabilities=['use'],) |
| Return ID and formatted name of question banks accessible by the user, in courses other than the one $contextid is in.
|
|
static | execute_parameters () |
| Define parameters for external function.
|
|
static | execute_returns () |
| Define return values.
|
|
|
int const | MAX_RESULTS = 20 |
| The maximum number of banks to return.
|
|
|
static | expand_capabilities (array $abbreviations) |
| Expand a list of abbreviated capaibilities into an array of full capability strings.
|
|
◆ execute()
static core_question\external\search_shared_banks::execute |
( |
int | $contextid, |
|
|
string | $search = '', |
|
|
array | $requiredcapabilities = ['use'] ) |
|
static |
Return ID and formatted name of question banks accessible by the user, in courses other than the one $contextid is in.
- Parameters
-
int | $contextid | Context ID of the current activity |
string | $search | String to filter results by question bank name |
array | $requiredcapabilities | List of abbreviated capabilities to check, { |
- See also
- self::expand_capabilities()}
- Return values
-
◆ execute_parameters()
static core_question\external\search_shared_banks::execute_parameters |
( |
| ) |
|
|
static |
Define parameters for external function.
- Return values
-
external_function_parameters | |
◆ execute_returns()
static core_question\external\search_shared_banks::execute_returns |
( |
| ) |
|
|
static |
Define return values.
- Return values
-
external_single_structure | |
◆ expand_capabilities()
static core_question\external\search_shared_banks::expand_capabilities |
( |
array | $abbreviations | ) |
|
|
staticprotected |
Expand a list of abbreviated capaibilities into an array of full capability strings.
Each abbreviation must match a capability with the 'moodle/question:' prefix. Capabilities that have an "all" and "mine" variant will have both variants included in the returned array.
These abbreviations are copied from {
- See also
- question_has_capability_on()}
- Parameters
-
array | $abbreviations | Abbreviated capabilities. Must match capabilities with the 'moodle/question:' prefix. |
- Return values
-
array | The expanded capabilities |
The documentation for this class was generated from the following file:
- question/classes/external/search_shared_banks.php