Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

(no description)

File Size: 1405 lines (58 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: mod_feedback_external  - X-Ref

Feedback external functions

get_feedbacks_by_courses_parameters()   X-Ref
Describes the parameters for get_feedbacks_by_courses.

return: external_function_parameters

get_feedbacks_by_courses($courseids = array()   X-Ref
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.

param: array $courseids course ids
return: array of warnings and feedbacks

get_feedbacks_by_courses_returns()   X-Ref
Describes the get_feedbacks_by_courses return value.

return: external_single_structure

validate_feedback($feedbackid, $courseid = 0)   X-Ref
Utility function for validating a feedback.

param: int $feedbackid feedback instance id
param: int $courseid courseid course where user completes the feedback (for site feedbacks only)
return: array containing the feedback, feedback course, context, course module and the course where is being completed.

validate_feedback_access($feedback, $course, $cm, $context, $checksubmit = false)   X-Ref
Utility function for validating access to feedback.

param: stdClass   $feedback feedback object
param: stdClass   $course   course where user completes the feedback (for site feedbacks only)
param: stdClass   $cm       course module
param: stdClass   $context  context object
return: mod_feedback_completion feedback completion instance

get_feedback_access_information_parameters()   X-Ref
Describes the parameters for get_feedback_access_information.

return: external_external_function_parameters

get_feedback_access_information($feedbackid, $courseid = 0)   X-Ref
Return access information for a given feedback.

param: int $feedbackid feedback instance id
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and the access information

get_feedback_access_information_returns()   X-Ref
Describes the get_feedback_access_information return value.

return: external_single_structure

view_feedback_parameters()   X-Ref
Describes the parameters for view_feedback.

return: external_function_parameters

view_feedback($feedbackid, $moduleviewed = false, $courseid = 0)   X-Ref
Trigger the course module viewed event and update the module completion status.

param: int $feedbackid feedback instance id
param: bool $moduleviewed If we need to mark the module as viewed for completion
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and status result

view_feedback_returns()   X-Ref
Describes the view_feedback return value.

return: external_single_structure

get_current_completed_tmp_parameters()   X-Ref
Describes the parameters for get_current_completed_tmp.

return: external_function_parameters

get_current_completed_tmp($feedbackid, $courseid = 0)   X-Ref
Returns the temporary completion record for the current user.

param: int $feedbackid feedback instance id
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and status result

get_current_completed_tmp_returns()   X-Ref
Describes the get_current_completed_tmp return value.

return: external_single_structure

get_items_parameters()   X-Ref
Describes the parameters for get_items.

return: external_function_parameters

get_items($feedbackid, $courseid = 0)   X-Ref
Returns the items (questions) in the given feedback.

param: int $feedbackid feedback instance id
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and feedbacks

get_items_returns()   X-Ref
Describes the get_items return value.

return: external_single_structure

launch_feedback_parameters()   X-Ref
Describes the parameters for launch_feedback.

return: external_function_parameters

launch_feedback($feedbackid, $courseid = 0)   X-Ref
Starts or continues a feedback submission

param: array $feedbackid feedback instance id
param: int $courseid course where user completes a feedback (for site feedbacks only).
return: array of warnings and launch information

launch_feedback_returns()   X-Ref
Describes the launch_feedback return value.

return: external_single_structure

get_page_items_parameters()   X-Ref
Describes the parameters for get_page_items.

return: external_function_parameters

get_page_items($feedbackid, $page, $courseid = 0)   X-Ref
Get a single feedback page items.

param: int $feedbackid feedback instance id
param: int $page the page to get starting by 0
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and launch information

get_page_items_returns()   X-Ref
Describes the get_page_items return value.

return: external_single_structure

process_page_parameters()   X-Ref
Describes the parameters for process_page.

return: external_function_parameters

process_page($feedbackid, $page, $responses = [], $goprevious = false, $courseid = 0)   X-Ref
Process a jump between pages.

param: array $feedbackid feedback instance id
param: array $page the page being processed
param: array $responses the responses to be processed
param: bool $goprevious whether we want to jump to previous page
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and launch information

process_page_returns()   X-Ref
Describes the process_page return value.

return: external_single_structure

get_analysis_parameters()   X-Ref
Describes the parameters for get_analysis.

return: external_function_parameters

get_analysis($feedbackid, $groupid = 0, $courseid = 0)   X-Ref
Retrieves the feedback analysis.

param: array $feedbackid feedback instance id
param: int $groupid group id, 0 means that the function will determine the user group
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and launch information

get_analysis_returns()   X-Ref
Describes the get_analysis return value.

return: external_single_structure

get_unfinished_responses_parameters()   X-Ref
Describes the parameters for get_unfinished_responses.

return: external_function_parameters

get_unfinished_responses($feedbackid, $courseid = 0)   X-Ref
Retrieves responses from the current unfinished attempt.

param: array $feedbackid feedback instance id
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and launch information

get_unfinished_responses_returns()   X-Ref
Describes the get_unfinished_responses return value.

return: external_single_structure

get_finished_responses_parameters()   X-Ref
Describes the parameters for get_finished_responses.

return: external_function_parameters

get_finished_responses($feedbackid, $courseid = 0)   X-Ref
Retrieves responses from the last finished attempt.

param: array $feedbackid feedback instance id
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and the responses

get_finished_responses_returns()   X-Ref
Describes the get_finished_responses return value.

return: external_single_structure

get_non_respondents_parameters()   X-Ref
Describes the parameters for get_non_respondents.

return: external_function_parameters

get_non_respondents($feedbackid, $groupid = 0, $sort = 'lastaccess', $page = 0, $perpage = 0,$courseid = 0)   X-Ref
Retrieves a list of students who didn't submit the feedback.

param: int $feedbackid feedback instance id
param: int $groupid Group id, 0 means that the function will determine the user group'
param: str $sort sort param, must be firstname, lastname or lastaccess (default)
param: int $page the page of records to return
param: int $perpage the number of records to return per page
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and users ids

get_non_respondents_returns()   X-Ref
Describes the get_non_respondents return value.

return: external_single_structure

get_responses_analysis_parameters()   X-Ref
Describes the parameters for get_responses_analysis.

return: external_function_parameters

get_responses_analysis($feedbackid, $groupid = 0, $page = 0, $perpage = 0, $courseid = 0)   X-Ref
Return the feedback user responses.

param: int $feedbackid feedback instance id
param: int $groupid Group id, 0 means that the function will determine the user group
param: int $page the page of records to return
param: int $perpage the number of records to return per page
param: int $courseid course where user completes the feedback (for site feedbacks only)
return: array of warnings and users attemps and responses

get_responses_analysis_returns()   X-Ref
Describes the get_responses_analysis return value.

return: external_single_structure

get_last_completed_parameters()   X-Ref
Describes the parameters for get_last_completed.

return: external_function_parameters

get_last_completed($feedbackid, $courseid = 0)   X-Ref
Retrieves the last completion record for the current user.

param: int $feedbackid feedback instance id
return: array of warnings and the last completed record

get_last_completed_returns()   X-Ref
Describes the get_last_completed return value.

return: external_single_structure