Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_enrol

Namespaces

namespace  core_enrol\form
  
 
namespace  core_enrol\hook
  
 
namespace  core_enrol\privacy
  
 
namespace  core_enrol\reportbuilder\local\entities
  
 

Classes

class  behat_enrol
 Steps definitions for general enrolment actions. More...
 
class  core_enrol\form\renameroles
 
class  core_enrol\hook\after_enrol_instance_status_updated
 
class  core_enrol\hook\after_user_enrolled
 
class  core_enrol\hook\before_enrol_instance_deleted
 
class  core_enrol\hook\before_user_enrolment_removed
 
class  core_enrol\hook\before_user_enrolment_updated
 
class  core_enrol\privacy\provider
 Privacy Subsystem for core_enrol implementing metadata and plugin providers. More...
 
class  core_enrol\reportbuilder\local\entities\enrol
 
class  core_enrol_external
 Enrol external functions. More...
 
class  core_enrol_renderer
 This is the core renderer. More...
 
class  core_role_external
 Role external functions. More...
 
class  course_enrolment_manager
 This class provides a targeted tied together means of interfacing the enrolment tasks together with a course. More...
 
class  course_enrolment_other_users_table
 Table used for other users. More...
 
class  course_enrolment_table
 Main course enrolment table. More...
 
class  course_enrolment_users_table
 Table control used for enrolled users. More...
 
class  enrol_ajax_exception
 
class  enrol_bulk_enrolment_change_form
 A base class that can be used to easily construct a form for use with bulk operations. More...
 
class  enrol_bulk_enrolment_confirm_form
 A convenience class to allow the quick generation of a confirmation form for a bulk operation. More...
 
class  enrol_bulk_enrolment_operation
 This class is used to manage a bulk operations for enrolment plugins. More...
 
class  enrol_instance_edit_form
 Standard edit form shared by all enrol plugins. More...
 
class  enrol_user_button
 A button that is used to enrol users in a course. More...
 
class  enrol_user_enrolment_form
 
class  enrol_users_addmember_form
 
class  enrol_users_assign_form
 
class  enrol_users_filter_form
 Form that lets users filter the enrolled user list. More...
 
class  user_enrolment_action
 User enrolment action. More...
 

Functions

static get_course_enrolment_methods ($courseid)
 Get list of active course enrolment methods for current user.
 
static get_course_enrolment_methods_parameters ()
 Returns description of get_course_enrolment_methods() parameters.
 
static get_course_enrolment_methods_returns ()
 Returns description of get_course_enrolment_methods() result value.
 
 get_default_enrol_roles (context $context, $addroleid=null)
 Create a role menu suitable for default role selection in enrol plugins.
 
static get_enrolled_users ($courseid, $options=[])
 Get course participants details.
 
static get_enrolled_users_parameters ()
 Returns description of method parameters.
 
static get_enrolled_users_returns ()
 Returns description of method result value.
 
static get_potential_users_returns ()
 Returns description of method result value.
 
static search_users (int $courseid, string $search, bool $searchanywhere, int $page, int $perpage, ?int $contextid=null)
 Search course participants.
 
static search_users_parameters ()
 Returns description of method parameters.
 
static search_users_returns ()
 Returns description of method result value.
 
static submit_user_enrolment_form ($formdata)
 External function that handles the user enrolment form submission.
 
static submit_user_enrolment_form_parameters ()
 Returns description of submit_user_enrolment_form parameters.
 
static submit_user_enrolment_form_returns ()
 Returns description of submit_user_enrolment_form() result value.
 
static unenrol_user_enrolment ($ueid)
 External function that unenrols a given user enrolment.
 
static unenrol_user_enrolment_parameters ()
 Returns description of unenrol_user_enrolment() parameters.
 
static unenrol_user_enrolment_returns ()
 Returns description of unenrol_user_enrolment() result value.
 

Detailed Description

Function Documentation

◆ get_course_enrolment_methods()

static get_course_enrolment_methods ( $courseid)
static

Get list of active course enrolment methods for current user.

Parameters
int$courseid
Return values
arrayof course enrolment methods
Exceptions
moodle_exception

◆ get_course_enrolment_methods_parameters()

static get_course_enrolment_methods_parameters ( )
static

Returns description of get_course_enrolment_methods() parameters.

Return values
external_function_parameters

◆ get_course_enrolment_methods_returns()

static get_course_enrolment_methods_returns ( )
static

Returns description of get_course_enrolment_methods() result value.

Return values
core_external\external_description

◆ get_default_enrol_roles()

get_default_enrol_roles ( context $context,
$addroleid = null )

Create a role menu suitable for default role selection in enrol plugins.

Parameters
context$context
int$addroleidcurrent or default role - always added to list
Return values
arrayroleid=>localised role name

◆ get_enrolled_users()

static get_enrolled_users ( $courseid,
$options = [] )
static

Get course participants details.

Parameters
int$courseidcourse id
array$optionsoptions { 'name' => option name 'value' => option value }
Return values
arrayAn array of users

◆ get_enrolled_users_parameters()

static get_enrolled_users_parameters ( )
static

Returns description of method parameters.

Return values
external_function_parameters

◆ get_enrolled_users_returns()

static get_enrolled_users_returns ( )
static

Returns description of method result value.

Return values
core_external\external_description

◆ get_potential_users_returns()

static get_potential_users_returns ( )
static

Returns description of method result value.

Return values
core_external\external_description

◆ search_users()

static search_users ( int $courseid,
string $search,
bool $searchanywhere,
int $page,
int $perpage,
?int $contextid = null )
static

Search course participants.

Parameters
int$courseidCourse id
string$searchThe query
bool$searchanywhereMatch anywhere in the string
int$pagePage number
int$perpageMax per page
?int$contextidContext ID we are in - we might use search on activity level and its group mode can be different from course group mode.
Return values
arrayAn array of users
Exceptions
moodle_exception

◆ search_users_parameters()

static search_users_parameters ( )
static

Returns description of method parameters.

Return values
external_function_parameters

◆ search_users_returns()

static search_users_returns ( )
static

Returns description of method result value.

Return values
external_multiple_structure

◆ submit_user_enrolment_form()

static submit_user_enrolment_form ( $formdata)
static

External function that handles the user enrolment form submission.

Parameters
string$formdataThe user enrolment form data in s URI encoded param string
Return values
arrayAn array consisting of the processing result and error flag, if available

◆ submit_user_enrolment_form_parameters()

static submit_user_enrolment_form_parameters ( )
static

Returns description of submit_user_enrolment_form parameters.

Return values
external_function_parameters

◆ submit_user_enrolment_form_returns()

static submit_user_enrolment_form_returns ( )
static

Returns description of submit_user_enrolment_form() result value.

Return values
core_external\external_description

◆ unenrol_user_enrolment()

static unenrol_user_enrolment ( $ueid)
static

External function that unenrols a given user enrolment.

Parameters
int$ueidThe user enrolment ID.
Return values
arrayAn array consisting of the processing result, errors.

◆ unenrol_user_enrolment_parameters()

static unenrol_user_enrolment_parameters ( )
static

Returns description of unenrol_user_enrolment() parameters.

Return values
external_function_parameters

◆ unenrol_user_enrolment_returns()

static unenrol_user_enrolment_returns ( )
static

Returns description of unenrol_user_enrolment() result value.

Return values
core_external\external_description