Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_feedback_external Class Reference
Inheritance diagram for mod_feedback_external:

Static Public Member Functions

static get_analysis ($feedbackid, $groupid=0, $courseid=0)
 Retrieves the feedback analysis.
 
static get_analysis_parameters ()
 Describes the parameters for get_analysis.
 
static get_analysis_returns ()
 Describes the get_analysis return value.
 
static get_current_completed_tmp ($feedbackid, $courseid=0)
 Returns the temporary completion record for the current user.
 
static get_current_completed_tmp_parameters ()
 Describes the parameters for get_current_completed_tmp.
 
static get_current_completed_tmp_returns ()
 Describes the get_current_completed_tmp return value.
 
static get_feedback_access_information ($feedbackid, $courseid=0)
 Return access information for a given feedback.
 
static get_feedback_access_information_parameters ()
 Describes the parameters for get_feedback_access_information.
 
static get_feedback_access_information_returns ()
 Describes the get_feedback_access_information return value.
 
static get_feedbacks_by_courses ($courseids=array())
 Returns a list of feedbacks in a provided list of courses.
 
static get_feedbacks_by_courses_parameters ()
 Describes the parameters for get_feedbacks_by_courses.
 
static get_feedbacks_by_courses_returns ()
 Describes the get_feedbacks_by_courses return value.
 
static get_finished_responses ($feedbackid, $courseid=0)
 Retrieves responses from the last finished attempt.
 
static get_finished_responses_parameters ()
 Describes the parameters for get_finished_responses.
 
static get_finished_responses_returns ()
 Describes the get_finished_responses return value.
 
static get_items ($feedbackid, $courseid=0)
 Returns the items (questions) in the given feedback.
 
static get_items_parameters ()
 Describes the parameters for get_items.
 
static get_items_returns ()
 Describes the get_items return value.
 
static get_last_completed ($feedbackid, $courseid=0)
 Retrieves the last completion record for the current user.
 
static get_last_completed_parameters ()
 Describes the parameters for get_last_completed.
 
static get_last_completed_returns ()
 Describes the get_last_completed return value.
 
static get_non_respondents ($feedbackid, $groupid=0, $sort='lastaccess', $page=0, $perpage=0, $courseid=0)
 Retrieves a list of students who didn't submit the feedback.
 
static get_non_respondents_parameters ()
 Describes the parameters for get_non_respondents.
 
static get_non_respondents_returns ()
 Describes the get_non_respondents return value.
 
static get_page_items ($feedbackid, $page, $courseid=0)
 Get a single feedback page items.
 
static get_page_items_parameters ()
 Describes the parameters for get_page_items.
 
static get_page_items_returns ()
 Describes the get_page_items return value.
 
static get_responses_analysis ($feedbackid, $groupid=0, $page=0, $perpage=0, $courseid=0)
 Return the feedback user responses.
 
static get_responses_analysis_parameters ()
 Describes the parameters for get_responses_analysis.
 
static get_responses_analysis_returns ()
 Describes the get_responses_analysis return value.
 
static get_unfinished_responses ($feedbackid, $courseid=0)
 Retrieves responses from the current unfinished attempt.
 
static get_unfinished_responses_parameters ()
 Describes the parameters for get_unfinished_responses.
 
static get_unfinished_responses_returns ()
 Describes the get_unfinished_responses return value.
 
static launch_feedback ($feedbackid, $courseid=0)
 Starts or continues a feedback submission.
 
static launch_feedback_parameters ()
 Describes the parameters for launch_feedback.
 
static launch_feedback_returns ()
 Describes the launch_feedback return value.
 
static process_page ($feedbackid, $page, $responses=[], $goprevious=false, $courseid=0)
 Process a jump between pages.
 
static process_page_parameters ()
 Describes the parameters for process_page.
 
static process_page_returns ()
 Describes the process_page return value.
 
static view_feedback ($feedbackid, $moduleviewed=false, $courseid=0)
 Trigger the course module viewed event and update the module completion status.
 
static view_feedback_parameters ()
 Describes the parameters for view_feedback.
 
static view_feedback_returns ()
 Describes the view_feedback return value.
 

Static Protected Member Functions

static validate_feedback ($feedbackid, $courseid=0)
 Utility function for validating a feedback.
 
static validate_feedback_access ($feedback, $course, $cm, $context, $checksubmit=false)
 Utility function for validating access to feedback.
 

Detailed Description

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

Member Function Documentation

◆ get_analysis()

static mod_feedback_external::get_analysis ( $feedbackid,
$groupid = 0,
$courseid = 0 )
static

Retrieves the feedback analysis.

Parameters
array$feedbackidfeedback instance id
int$groupidgroup id, 0 means that the function will determine the user group
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and launch information
Since
Moodle 3.3

◆ get_analysis_parameters()

static mod_feedback_external::get_analysis_parameters ( )
static

Describes the parameters for get_analysis.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_analysis_returns()

static mod_feedback_external::get_analysis_returns ( )
static

Describes the get_analysis return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_current_completed_tmp()

static mod_feedback_external::get_current_completed_tmp ( $feedbackid,
$courseid = 0 )
static

Returns the temporary completion record for the current user.

Parameters
int$feedbackidfeedback instance id
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and status result
Since
Moodle 3.3
Exceptions
moodle_exception

◆ get_current_completed_tmp_parameters()

static mod_feedback_external::get_current_completed_tmp_parameters ( )
static

Describes the parameters for get_current_completed_tmp.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_current_completed_tmp_returns()

static mod_feedback_external::get_current_completed_tmp_returns ( )
static

Describes the get_current_completed_tmp return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_feedback_access_information()

static mod_feedback_external::get_feedback_access_information ( $feedbackid,
$courseid = 0 )
static

Return access information for a given feedback.

Parameters
int$feedbackidfeedback instance id
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and the access information
Since
Moodle 3.3
Exceptions
moodle_exception

◆ get_feedback_access_information_parameters()

static mod_feedback_external::get_feedback_access_information_parameters ( )
static

Describes the parameters for get_feedback_access_information.

Return values
external_external_function_parameters
Since
Moodle 3.3

◆ get_feedback_access_information_returns()

static mod_feedback_external::get_feedback_access_information_returns ( )
static

Describes the get_feedback_access_information return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_feedbacks_by_courses()

static mod_feedback_external::get_feedbacks_by_courses ( $courseids = array())
static

Returns a list of feedbacks in a provided list of courses.

If no list is provided all feedbacks that the user can view will be returned.

Parameters
array$courseidscourse ids
Return values
arrayof warnings and feedbacks
Since
Moodle 3.3

◆ get_feedbacks_by_courses_parameters()

static mod_feedback_external::get_feedbacks_by_courses_parameters ( )
static

Describes the parameters for get_feedbacks_by_courses.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_feedbacks_by_courses_returns()

static mod_feedback_external::get_feedbacks_by_courses_returns ( )
static

Describes the get_feedbacks_by_courses return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_finished_responses()

static mod_feedback_external::get_finished_responses ( $feedbackid,
$courseid = 0 )
static

Retrieves responses from the last finished attempt.

Parameters
array$feedbackidfeedback instance id
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and the responses
Since
Moodle 3.3

◆ get_finished_responses_parameters()

static mod_feedback_external::get_finished_responses_parameters ( )
static

Describes the parameters for get_finished_responses.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_finished_responses_returns()

static mod_feedback_external::get_finished_responses_returns ( )
static

Describes the get_finished_responses return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_items()

static mod_feedback_external::get_items ( $feedbackid,
$courseid = 0 )
static

Returns the items (questions) in the given feedback.

Parameters
int$feedbackidfeedback instance id
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and feedbacks
Since
Moodle 3.3

◆ get_items_parameters()

static mod_feedback_external::get_items_parameters ( )
static

Describes the parameters for get_items.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_items_returns()

static mod_feedback_external::get_items_returns ( )
static

Describes the get_items return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_last_completed()

static mod_feedback_external::get_last_completed ( $feedbackid,
$courseid = 0 )
static

Retrieves the last completion record for the current user.

Parameters
int$feedbackidfeedback instance id
Return values
arrayof warnings and the last completed record
Since
Moodle 3.3
Exceptions
moodle_exception

◆ get_last_completed_parameters()

static mod_feedback_external::get_last_completed_parameters ( )
static

Describes the parameters for get_last_completed.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_last_completed_returns()

static mod_feedback_external::get_last_completed_returns ( )
static

Describes the get_last_completed return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_non_respondents()

static mod_feedback_external::get_non_respondents ( $feedbackid,
$groupid = 0,
$sort = 'lastaccess',
$page = 0,
$perpage = 0,
$courseid = 0 )
static

Retrieves a list of students who didn't submit the feedback.

Parameters
int$feedbackidfeedback instance id
int$groupidGroup id, 0 means that the function will determine the user group'
str$sortsort param, must be firstname, lastname or lastaccess (default)
int$pagethe page of records to return
int$perpagethe number of records to return per page
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and users ids
Since
Moodle 3.3

◆ get_non_respondents_parameters()

static mod_feedback_external::get_non_respondents_parameters ( )
static

Describes the parameters for get_non_respondents.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_non_respondents_returns()

static mod_feedback_external::get_non_respondents_returns ( )
static

Describes the get_non_respondents return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_page_items()

static mod_feedback_external::get_page_items ( $feedbackid,
$page,
$courseid = 0 )
static

Get a single feedback page items.

Parameters
int$feedbackidfeedback instance id
int$pagethe page to get starting by 0
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and launch information
Since
Moodle 3.3

◆ get_page_items_parameters()

static mod_feedback_external::get_page_items_parameters ( )
static

Describes the parameters for get_page_items.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_page_items_returns()

static mod_feedback_external::get_page_items_returns ( )
static

Describes the get_page_items return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_responses_analysis()

static mod_feedback_external::get_responses_analysis ( $feedbackid,
$groupid = 0,
$page = 0,
$perpage = 0,
$courseid = 0 )
static

Return the feedback user responses.

Parameters
int$feedbackidfeedback instance id
int$groupidGroup id, 0 means that the function will determine the user group
int$pagethe page of records to return
int$perpagethe number of records to return per page
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and users attemps and responses
Exceptions
moodle_exception
Since
Moodle 3.3

◆ get_responses_analysis_parameters()

static mod_feedback_external::get_responses_analysis_parameters ( )
static

Describes the parameters for get_responses_analysis.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_responses_analysis_returns()

static mod_feedback_external::get_responses_analysis_returns ( )
static

Describes the get_responses_analysis return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ get_unfinished_responses()

static mod_feedback_external::get_unfinished_responses ( $feedbackid,
$courseid = 0 )
static

Retrieves responses from the current unfinished attempt.

Parameters
array$feedbackidfeedback instance id
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and launch information
Since
Moodle 3.3

◆ get_unfinished_responses_parameters()

static mod_feedback_external::get_unfinished_responses_parameters ( )
static

Describes the parameters for get_unfinished_responses.

Return values
external_function_parameters
Since
Moodle 3.3

◆ get_unfinished_responses_returns()

static mod_feedback_external::get_unfinished_responses_returns ( )
static

Describes the get_unfinished_responses return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ launch_feedback()

static mod_feedback_external::launch_feedback ( $feedbackid,
$courseid = 0 )
static

Starts or continues a feedback submission.

Parameters
array$feedbackidfeedback instance id
int$courseidcourse where user completes a feedback (for site feedbacks only).
Return values
arrayof warnings and launch information
Since
Moodle 3.3

◆ launch_feedback_parameters()

static mod_feedback_external::launch_feedback_parameters ( )
static

Describes the parameters for launch_feedback.

Return values
external_function_parameters
Since
Moodle 3.3

◆ launch_feedback_returns()

static mod_feedback_external::launch_feedback_returns ( )
static

Describes the launch_feedback return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ process_page()

static mod_feedback_external::process_page ( $feedbackid,
$page,
$responses = [],
$goprevious = false,
$courseid = 0 )
static

Process a jump between pages.

Parameters
array$feedbackidfeedback instance id
array$pagethe page being processed
array$responsesthe responses to be processed
bool$gopreviouswhether we want to jump to previous page
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and launch information
Since
Moodle 3.3

◆ process_page_parameters()

static mod_feedback_external::process_page_parameters ( )
static

Describes the parameters for process_page.

Return values
external_function_parameters
Since
Moodle 3.3

◆ process_page_returns()

static mod_feedback_external::process_page_returns ( )
static

Describes the process_page return value.

Return values
external_single_structure
Since
Moodle 3.3

◆ validate_feedback()

static mod_feedback_external::validate_feedback ( $feedbackid,
$courseid = 0 )
staticprotected

Utility function for validating a feedback.

Parameters
int$feedbackidfeedback instance id
int$courseidcourseid course where user completes the feedback (for site feedbacks only)
Return values
arraycontaining the feedback, feedback course, context, course module and the course where is being completed.
Exceptions
moodle_exception
Since
Moodle 3.3

◆ validate_feedback_access()

static mod_feedback_external::validate_feedback_access ( $feedback,
$course,
$cm,
$context,
$checksubmit = false )
staticprotected

Utility function for validating access to feedback.

Parameters
stdClass$feedbackfeedback object
stdClass$coursecourse where user completes the feedback (for site feedbacks only)
stdClass$cmcourse module
stdClass$contextcontext object
Exceptions
moodle_exception
Return values
mod_feedback_completionfeedback completion instance
Since
Moodle 3.3

◆ view_feedback()

static mod_feedback_external::view_feedback ( $feedbackid,
$moduleviewed = false,
$courseid = 0 )
static

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

Parameters
int$feedbackidfeedback instance id
bool$moduleviewedIf we need to mark the module as viewed for completion
int$courseidcourse where user completes the feedback (for site feedbacks only)
Return values
arrayof warnings and status result
Since
Moodle 3.3
Exceptions
moodle_exception

◆ view_feedback_parameters()

static mod_feedback_external::view_feedback_parameters ( )
static

Describes the parameters for view_feedback.

Return values
external_function_parameters
Since
Moodle 3.3

◆ view_feedback_returns()

static mod_feedback_external::view_feedback_returns ( )
static

Describes the view_feedback return value.

Return values
external_single_structure
Since
Moodle 3.3

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