Question external functions.
More...
|
static | get_random_question_summaries ( $categoryid, $includesubcategories, $tagids, $contextid, $limit=0, $offset=0) |
| Gets the list of random questions for the given criteria.
|
|
static | get_random_question_summaries_parameters () |
| Returns description of method parameters.
|
|
static | get_random_question_summaries_returns () |
| Returns description of method result value.
|
|
static | update_flag ($qubaid, $questionid, $qaid, $slot, $checksum, $newstate) |
| Update the flag state of a question attempt.
|
|
static | update_flag_parameters () |
| Returns description of method parameters.
|
|
static | update_flag_returns () |
| Returns description of method result value.
|
|
Question external functions.
- Copyright
- 2016 Pau Ferrer pau@m.nosp@m.oodl.nosp@m.e.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- Since
- Moodle 3.1
◆ get_random_question_summaries()
static core_question_external::get_random_question_summaries |
( |
| $categoryid, |
|
|
| $includesubcategories, |
|
|
| $tagids, |
|
|
| $contextid, |
|
|
| $limit = 0, |
|
|
| $offset = 0 ) |
|
static |
Gets the list of random questions for the given criteria.
The questions will be exported in a summaries format and won't include all of the question data.
- Parameters
-
int | $categoryid | Category id to find random questions |
bool | $includesubcategories | Include the subcategories in the search |
int[] | $tagids | Only include questions with these tags |
int | $contextid | The context id where the questions will be rendered |
int | $limit | Maximum number of results to return |
int | $offset | Number of items to skip from the beginning of the result set. |
- Return values
-
array | The list of questions and total question count. |
◆ get_random_question_summaries_parameters()
static core_question_external::get_random_question_summaries_parameters |
( |
| ) |
|
|
static |
Returns description of method parameters.
- Return values
-
external_function_parameters. | |
◆ update_flag()
static core_question_external::update_flag |
( |
| $qubaid, |
|
|
| $questionid, |
|
|
| $qaid, |
|
|
| $slot, |
|
|
| $checksum, |
|
|
| $newstate ) |
|
static |
Update the flag state of a question attempt.
- Parameters
-
int | $qubaid | the question usage id. |
int | $questionid | the question id. |
int | $qaid | the question_attempt id. |
int | $slot | the slot number within the usage. |
string | $checksum | checksum, as computed by get_toggle_checksum() corresponding to the last three arguments and the users username. |
bool | $newstate | the new state of the flag. true = flagged. |
- Return values
-
array | (success infos and fail infos) |
- Since
- Moodle 3.1
◆ update_flag_parameters()
static core_question_external::update_flag_parameters |
( |
| ) |
|
|
static |
Returns description of method parameters.
- Return values
-
external_function_parameters | |
- Since
- Moodle 3.1
◆ update_flag_returns()
static core_question_external::update_flag_returns |
( |
| ) |
|
|
static |
Returns description of method result value.
- Return values
-
- Since
- Moodle 3.1
The documentation for this class was generated from the following file:
- question/classes/external.php