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.

Class: core_completion_external  - X-Ref

Completion external functions

update_activity_completion_status_manually_parameters()   X-Ref
Describes the parameters for update_activity_completion_status_manually.

return: external_function_parameters

update_activity_completion_status_manually($cmid, $completed)   X-Ref
Update completion status for the current user in an activity, only for activities with manual tracking.

param: int $cmid      Course module id
param: bool $completed Activity completed or not
return: array            Result and possible warnings

update_activity_completion_status_manually_returns()   X-Ref
Describes the update_activity_completion_status_manually return value.

return: external_single_structure

override_activity_completion_status_parameters()   X-Ref
Describes the parameters for override_activity_completion_status.

return: external_external_function_parameters

override_activity_completion_status($userid, $cmid, $newstate)   X-Ref
Update completion status for a user in an activity.

param: int $userid    User id
param: int $cmid      Course module id
param: int $newstate  Activity completion
return: array          Array containing the current (updated) completion status.

override_activity_completion_status_returns()   X-Ref
Describes the override_activity_completion_status return value.

return: external_single_structure

get_activities_completion_status_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_activities_completion_status($courseid, $userid)   X-Ref
Get Activities completion status

param: int $courseid ID of the Course
param: int $userid ID of the User
return: array of activities progress and warnings

get_activities_completion_status_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

get_course_completion_status_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_course_completion_status($courseid, $userid)   X-Ref
Get Course completion status

param: int $courseid ID of the Course
param: int $userid ID of the User
return: array of course completion status and warnings

get_course_completion_status_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

mark_course_self_completed_parameters()   X-Ref
Describes the parameters for mark_course_self_completed.

return: external_function_parameters

mark_course_self_completed($courseid)   X-Ref
Update the course completion status for the current user (if course self-completion is enabled).

param: int $courseid    Course id
return: array            Result and possible warnings

mark_course_self_completed_returns()   X-Ref
Describes the mark_course_self_completed return value.

return: external_single_structure