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

Survey external functions. More...

Inheritance diagram for mod_survey_external:

Static Public Member Functions

static get_questions ($surveyid)
 Get the complete list of questions for the survey, including subquestions.
 
static get_questions_parameters ()
 Returns description of method parameters.
 
static get_questions_returns ()
 Returns description of method result value.
 
static get_surveys_by_courses ($courseids=array())
 Returns a list of surveys in a provided list of courses, if no list is provided all surveys that the user can view will be returned.
 
static get_surveys_by_courses_parameters ()
 Describes the parameters for get_surveys_by_courses.
 
static get_surveys_by_courses_returns ()
 Describes the get_surveys_by_courses return value.
 
static submit_answers ($surveyid, $answers)
 Submit the answers for a given survey.
 
static submit_answers_parameters ()
 Describes the parameters for submit_answers.
 
static submit_answers_returns ()
 Returns description of method result value.
 
static view_survey ($surveyid)
 Trigger the course module viewed event and update the module completion status.
 
static view_survey_parameters ()
 Returns description of method parameters.
 
static view_survey_returns ()
 Returns description of method result value.
 

Detailed Description

Survey external functions.

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

Member Function Documentation

◆ get_questions()

static mod_survey_external::get_questions ( $surveyid)
static

Get the complete list of questions for the survey, including subquestions.

Parameters
int$surveyidthe survey instance id
Return values
arrayof warnings and the question list
Since
Moodle 3.0
Exceptions
moodle_exception

◆ get_questions_parameters()

static mod_survey_external::get_questions_parameters ( )
static

Returns description of method parameters.

Return values
external_function_parameters
Since
Moodle 3.0

◆ get_questions_returns()

static mod_survey_external::get_questions_returns ( )
static

Returns description of method result value.

Return values
core_external\external_description
Since
Moodle 3.0

◆ get_surveys_by_courses()

static mod_survey_external::get_surveys_by_courses ( $courseids = array())
static

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

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

◆ get_surveys_by_courses_parameters()

static mod_survey_external::get_surveys_by_courses_parameters ( )
static

Describes the parameters for get_surveys_by_courses.

Return values
external_function_parameters
Since
Moodle 3.0

◆ get_surveys_by_courses_returns()

static mod_survey_external::get_surveys_by_courses_returns ( )
static

Describes the get_surveys_by_courses return value.

Return values
external_single_structure
Since
Moodle 3.0

◆ submit_answers()

static mod_survey_external::submit_answers ( $surveyid,
$answers )
static

Submit the answers for a given survey.

Parameters
int$surveyidthe survey instance id
array$answersthe survey answers
Return values
arrayof warnings and status result
Since
Moodle 3.0
Exceptions
moodle_exception

◆ submit_answers_parameters()

static mod_survey_external::submit_answers_parameters ( )
static

Describes the parameters for submit_answers.

Return values
external_function_parameters
Since
Moodle 3.0

◆ submit_answers_returns()

static mod_survey_external::submit_answers_returns ( )
static

Returns description of method result value.

Return values
core_external\external_description
Since
Moodle 3.0

◆ view_survey()

static mod_survey_external::view_survey ( $surveyid)
static

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

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

◆ view_survey_parameters()

static mod_survey_external::view_survey_parameters ( )
static

Returns description of method parameters.

Return values
external_function_parameters
Since
Moodle 3.0

◆ view_survey_returns()

static mod_survey_external::view_survey_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: