Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
mod_choice_external Class Reference

Choice module external functions. More...

Inheritance diagram for mod_choice_external:

Static Public Member Functions

static delete_choice_responses ($choiceid, $responses=array())
 Delete the given submitted responses in a choice.
 
static delete_choice_responses_parameters ()
 Describes the parameters for delete_choice_responses.
 
static delete_choice_responses_returns ()
 Describes the delete_choice_responses return value.
 
static get_choice_options ($choiceid)
 Returns options for a specific choice.
 
static get_choice_options_parameters ()
 Describes the parameters for mod_choice_get_choice_options.
 
static get_choice_options_returns ()
 Describes the get_choice_results return value.
 
static get_choice_results ($choiceid)
 Returns user's results for a specific choice and a list of those users that did not answered yet.
 
static get_choice_results_parameters ()
 Describes the parameters for get_choices_by_courses.
 
static get_choice_results_returns ()
 Describes the get_choice_results return value.
 
static get_choices_by_courses ($courseids=array())
 Returns a list of choices in a provided list of courses, if no list is provided all choices that the user can view will be returned.
 
static get_choices_by_courses_parameters ()
 Describes the parameters for get_choices_by_courses.
 
static get_choices_by_courses_returns ()
 Describes the mod_choice_get_choices_by_courses return value.
 
static submit_choice_response ($choiceid, $responses)
 Submit choice responses.
 
static submit_choice_response_parameters ()
 Describes the parameters for submit_choice_response.
 
static submit_choice_response_returns ()
 Describes the submit_choice_response return value.
 
static view_choice ($choiceid)
 Trigger the course module viewed event and update the module completion status.
 
static view_choice_parameters ()
 Returns description of method parameters.
 
static view_choice_returns ()
 Returns description of method result value.
 

Detailed Description

Choice module external functions.

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

Member Function Documentation

◆ delete_choice_responses()

static mod_choice_external::delete_choice_responses ( $choiceid,
$responses = array() )
static

Delete the given submitted responses in a choice.

Parameters
int$choiceidthe choice instance id
array$responsesthe response ids, empty for deleting all the current user responses
Return values
arraystatus information and warnings
Exceptions
moodle_exception
Since
Moodle 3.0

◆ delete_choice_responses_parameters()

static mod_choice_external::delete_choice_responses_parameters ( )
static

Describes the parameters for delete_choice_responses.

Return values
external_function_parameters
Since
Moodle 3.0

◆ delete_choice_responses_returns()

static mod_choice_external::delete_choice_responses_returns ( )
static

Describes the delete_choice_responses return value.

Return values
external_multiple_structure
Since
Moodle 3.0

◆ get_choice_options()

static mod_choice_external::get_choice_options ( $choiceid)
static

Returns options for a specific choice.

Parameters
int$choiceidthe choice instance id
Return values
arrayof options details
Since
Moodle 3.0

◆ get_choice_options_parameters()

static mod_choice_external::get_choice_options_parameters ( )
static

Describes the parameters for mod_choice_get_choice_options.

Return values
external_function_parameters
Since
Moodle 3.0

◆ get_choice_options_returns()

static mod_choice_external::get_choice_options_returns ( )
static

Describes the get_choice_results return value.

Return values
external_multiple_structure
Since
Moodle 3.0

◆ get_choice_results()

static mod_choice_external::get_choice_results ( $choiceid)
static

Returns user's results for a specific choice and a list of those users that did not answered yet.

Parameters
int$choiceidthe choice instance id
Return values
arrayof responses details
Since
Moodle 3.0

◆ get_choice_results_parameters()

static mod_choice_external::get_choice_results_parameters ( )
static

Describes the parameters for get_choices_by_courses.

Return values
external_function_parameters
Since
Moodle 3.0

◆ get_choice_results_returns()

static mod_choice_external::get_choice_results_returns ( )
static

Describes the get_choice_results return value.

Return values
external_single_structure
Since
Moodle 3.0

◆ get_choices_by_courses()

static mod_choice_external::get_choices_by_courses ( $courseids = array())
static

Returns a list of choices in a provided list of courses, if no list is provided all choices that the user can view will be returned.

Parameters
array$courseidsthe course ids
Return values
arrayof choices details
Since
Moodle 3.0

◆ get_choices_by_courses_parameters()

static mod_choice_external::get_choices_by_courses_parameters ( )
static

Describes the parameters for get_choices_by_courses.

Return values
external_function_parameters
Since
Moodle 3.0

◆ get_choices_by_courses_returns()

static mod_choice_external::get_choices_by_courses_returns ( )
static

Describes the mod_choice_get_choices_by_courses return value.

Return values
external_single_structure
Since
Moodle 3.0

◆ submit_choice_response()

static mod_choice_external::submit_choice_response ( $choiceid,
$responses )
static

Submit choice responses.

Parameters
int$choiceidthe choice instance id
array$responsesthe response ids
Return values
arrayanswers information and warnings
Since
Moodle 3.0

◆ submit_choice_response_parameters()

static mod_choice_external::submit_choice_response_parameters ( )
static

Describes the parameters for submit_choice_response.

Return values
external_function_parameters
Since
Moodle 3.0

◆ submit_choice_response_returns()

static mod_choice_external::submit_choice_response_returns ( )
static

Describes the submit_choice_response return value.

Return values
external_multiple_structure
Since
Moodle 3.0

◆ view_choice()

static mod_choice_external::view_choice ( $choiceid)
static

Trigger the course module viewed event and update the module completion status.

Parameters
int$choiceidthe choice instance id
Return values
arrayof warnings and status result
Since
Moodle 3.0
Exceptions
moodle_exception

◆ view_choice_parameters()

static mod_choice_external::view_choice_parameters ( )
static

Returns description of method parameters.

Return values
external_function_parameters
Since
Moodle 3.0

◆ view_choice_returns()

static mod_choice_external::view_choice_returns ( )
static

Returns description of method result value.

Return values
core_external\external_description
Since
Moodle 3.0

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