Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | List of all members
core_completion\privacy\provider Class Reference

Privacy class for requesting user data. More...

Inheritance diagram for core_completion\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\subsystem\plugin_provider core_privacy\local\request\shared_userlist_provider core_privacy\local\request\shared_data_provider core_privacy\local\request\userlist_provider core_privacy\local\request\data_provider

Static Public Member Functions

static add_course_completion_users_to_userlist (userlist $userlist)
 Find users' course completion by context and add to the provided userlist. More...
 
static delete_completion (\stdClass $user=null, int $courseid=null, int $cmid=null)
 Delete completion information for users. More...
 
static delete_completion_by_approved_userlist (approved_userlist $userlist, int $courseid=null, int $cmid=null)
 Delete completion information for users within an approved userlist. More...
 
static get_activity_completion_info (\stdClass $user, stdClass $course, $cm)
 Returns activity completion information about a user. More...
 
static get_course_completion_info (\stdClass $user, stdClass $course)
 Returns course completion information for a user. More...
 
static get_course_completion_join_sql (int $userid, string $prefix, string $joinfield)
 Get join sql to retrieve courses the user is in. More...
 
static get_metadata (collection $collection)
 Returns meta data about this system. More...
 

Detailed Description

Privacy class for requesting user data.

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

Member Function Documentation

◆ add_course_completion_users_to_userlist()

static core_completion\privacy\provider::add_course_completion_users_to_userlist ( userlist  $userlist)
static

Find users' course completion by context and add to the provided userlist.

Parameters
userlist$userlistThe userlist to add to.

◆ delete_completion()

static core_completion\privacy\provider::delete_completion ( \stdClass  $user = null,
int  $courseid = null,
int  $cmid = null 
)
static

Delete completion information for users.

Parameters
stdClass$userThe user. If provided will delete completion information for just this user. Else all users.
int$courseidThe course id. Provide this if you want course completion and activity completion deleted.
int$cmidThe course module id. Provide this if you only want activity completion deleted.

◆ delete_completion_by_approved_userlist()

static core_completion\privacy\provider::delete_completion_by_approved_userlist ( approved_userlist  $userlist,
int  $courseid = null,
int  $cmid = null 
)
static

Delete completion information for users within an approved userlist.

Parameters
approved_userlist$userlistThe approved userlist of users to delete completion information for.
int$courseidThe course id. Provide this if you want course completion and activity completion deleted.
int$cmidThe course module id. Provide this if you only want activity completion deleted.

◆ get_activity_completion_info()

static core_completion\privacy\provider::get_activity_completion_info ( \stdClass  $user,
stdClass  $course,
  $cm 
)
static

Returns activity completion information about a user.

Parameters
stdClass$userThe user to return information about.
stdClass$courseThe course the user is in.
stdClass$cmCourse module information.
Return values
stdClassActivity completion information.

◆ get_course_completion_info()

static core_completion\privacy\provider::get_course_completion_info ( \stdClass  $user,
stdClass  $course 
)
static

Returns course completion information for a user.

Parameters
stdClass$userThe user that we are getting completion information for.
stdClass$courseThe course we are interested in.
Return values
stdClassCourse completion information.

◆ get_course_completion_join_sql()

static core_completion\privacy\provider::get_course_completion_join_sql ( int  $userid,
string  $prefix,
string  $joinfield 
)
static

Get join sql to retrieve courses the user is in.

Parameters
int$useridThe user ID
string$prefixA unique prefix for these joins.
string$joinfieldA field to join these tables to. Joins to course ID.
Return values
arrayThe join, where, and params for this join.

◆ get_metadata()

static core_completion\privacy\provider::get_metadata ( collection  $collection)
static

Returns meta data about this system.

Parameters
collection$collectionThe initialised collection to add items to.
Return values
collectionA listing of user data stored through this system.

Implements core_privacy\local\metadata\provider.


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