Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_question_external Class Reference

Question external functions. More...

Inheritance diagram for core_question_external:

Static Public Member Functions

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.
 

Detailed Description

Question external functions.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Since
Moodle 3.1

Member Function Documentation

◆ 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$categoryidCategory id to find random questions
bool$includesubcategoriesInclude the subcategories in the search
int[]$tagidsOnly include questions with these tags
int$contextidThe context id where the questions will be rendered
int$limitMaximum number of results to return
int$offsetNumber of items to skip from the beginning of the result set.
Return values
arrayThe 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$qubaidthe question usage id.
int$questionidthe question id.
int$qaidthe question_attempt id.
int$slotthe slot number within the usage.
string$checksumchecksum, as computed by get_toggle_checksum() corresponding to the last three arguments and the users username.
bool$newstatethe 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
external_description
Since
Moodle 3.1

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