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 | submit_tags_form ($questionid, $contextid, $formdata) |
| Handles the tags form submission.
|
|
static | submit_tags_form_is_deprecated () |
| Marking the method as deprecated.
|
|
static | submit_tags_form_parameters () |
| Returns description of method parameters.
|
|
static | submit_tags_form_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. | |
◆ submit_tags_form()
static core_question_external::submit_tags_form |
( |
| $questionid, |
|
|
| $contextid, |
|
|
| $formdata ) |
|
static |
Handles the tags form submission.
- Parameters
-
int | $questionid | The question id. |
int | $contextid | The editing context id. |
string | $formdata | The question tag form data in a URI encoded param string |
- Return values
-
array | The created or modified question tag |
- Deprecated
- since Moodle 4.0
- See also
- qbank_tagquestion\external\qbank_tagquestion_external
- Todo
- Final deprecation on Moodle 4.4 MDL-72438
◆ submit_tags_form_is_deprecated()
static core_question_external::submit_tags_form_is_deprecated |
( |
| ) |
|
|
static |
◆ submit_tags_form_parameters()
static core_question_external::submit_tags_form_parameters |
( |
| ) |
|
|
static |
Returns description of method parameters.
- Return values
-
external_function_parameters. | |
- Deprecated
- since Moodle 4.0
- See also
- qbank_tagquestion\external\qbank_tagquestion_external
- Todo
- Final deprecation on Moodle 4.4 MDL-72438
◆ submit_tags_form_returns()
static core_question_external::submit_tags_form_returns |
( |
| ) |
|
|
static |
Returns description of method result value.
- Deprecated
- since Moodle 4.0
- See also
- qbank_tagquestion\external\qbank_tagquestion_external
- Todo
- Final deprecation on Moodle 4.4 MDL-72438
◆ 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