Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
enrol_imsenterprise

Namespaces

namespace  enrol_imsenterprise\privacy
  
 
namespace  enrol_imsenterprise\task
  
 

Classes

class  enrol_imsenterprise\privacy\provider
 Privacy Subsystem for enrol_imsenterprise implementing null_provider. More...
 
class  enrol_imsenterprise\task\cron_task
 Simple task to run the IMS Enterprise enrolment cron. More...
 
class  enrol_imsenterprise_plugin
 IMS Enterprise file enrolment plugin. More...
 
class  imsenterprise_courses
 Mapping between Moodle course attributes and IMS enterprise group description tags. More...
 
class  imsenterprise_roles
 Class for dealing with role mappings in IMS Enterprise. More...
 

Functions

 can_delete_instance ($instance)
 Is it possible to delete enrol instance via standard UI?
 
 can_hide_show_instance ($instance)
 Is it possible to hide/show enrol instance via standard UI?
 
static decode_timeframe ($string)
 Process the INNER contents of a <timeframe> tag, to return beginning/ending dates.
 
 enrol_imsenterprise_allow_group_member_remove ($itemid, $groupid, $userid)
 Called whenever anybody tries (from the normal interface) to remove a group member which is registered as being created by this component.
 
 load_course_mappings ()
 Load the name mappings (from the config), so we can easily refer to how an IMS-E course properties corresponds to a Moodle course properties.
 
 load_role_mappings ()
 Load the role mappings (from the config), so we can easily refer to how an IMS-E role corresponds to a Moodle role.
 
 log_line ($string)
 Store logging information.
 
 process_membership_tag ($tagcontents)
 Process the membership tag.
 
 process_properties_tag ($tagcontents)
 Process the properties tag.
 
 xmldb_enrol_imsenterprise_install ()
 Post installation procedure.
 
 xmldb_enrol_imsenterprise_upgrade ($oldversion)
 Performs upgrade of the database structure and data.
 

Variables

 $capabilities
 
 $messageproviders
 
 $plugin = 2023041800
 
 $tasks
 
$plugin component = 'enrol_imsenterprise'
 
$plugin version = 2023042400
 

Detailed Description

Function Documentation

◆ can_delete_instance()

can_delete_instance ( $instance)

Is it possible to delete enrol instance via standard UI?

Parameters
object$instance
Return values
bool

◆ can_hide_show_instance()

can_hide_show_instance ( $instance)

Is it possible to hide/show enrol instance via standard UI?

Parameters
stdClass$instance
Return values
bool

◆ decode_timeframe()

static decode_timeframe ( $string)
staticprotected

Process the INNER contents of a <timeframe> tag, to return beginning/ending dates.

Parameters
string$stringtag to decode.
Return values
stdClassbeginning and/or ending is returned, in unix time, zero indicating not specified.

◆ enrol_imsenterprise_allow_group_member_remove()

enrol_imsenterprise_allow_group_member_remove ( $itemid,
$groupid,
$userid )

Called whenever anybody tries (from the normal interface) to remove a group member which is registered as being created by this component.

(Not called when deleting an entire group or course at once.)

Parameters
int$itemidItem ID that was stored in the group_members entry
int$groupidGroup ID
int$useridUser ID being removed from group
Return values
boolTrue if the remove is permitted, false to give an error

◆ log_line()

log_line ( $string)
protected

Store logging information.

This does two things: uses the mtrace() function to print info to screen/STDOUT, and also writes log to a text file if a path has been specified.

Parameters
string$stringText to write (newline will be added automatically)

◆ process_membership_tag()

process_membership_tag ( $tagcontents)
protected

Process the membership tag.

This defines whether the specified Moodle users should be added/removed as teachers/students.

Parameters
string$tagcontentsThe raw contents of the XML element

◆ process_properties_tag()

process_properties_tag ( $tagcontents)
protected

Process the properties tag.

The only data from this element that is relevant is whether a <target> is specified.

Parameters
string$tagcontentsThe raw contents of the XML element

◆ xmldb_enrol_imsenterprise_upgrade()

xmldb_enrol_imsenterprise_upgrade ( $oldversion)

Performs upgrade of the database structure and data.

Parameters
int$oldversionthe version we are upgrading from
Return values
booltrue

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= array(
'enrol/imsenterprise:config' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
)
),
)
const CONTEXT_COURSE
Course context level - one instances for each course.
Definition accesslib.php:128
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition accesslib.php:115

◆ $messageproviders

$messageproviders
Initial value:
= array(
'imsenterprise_enrolment' => array(),
)

◆ $tasks

$tasks
Initial value:
= array(
array(
'classname' => 'enrol_imsenterprise\task\cron_task',
'blocking' => 0,
'minute' => '10',
'hour' => '*',
'day' => '*',
'month' => '*',
'dayofweek' => '*'
)
)