Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Files | Namespaces | Classes | Functions | Variables
enrol_imsenterprise

Files

file  access.php
 Capabilities for imsenterprise enrolment plugin.
 
file  cron_task.php
 A scheduled task.
 
file  install.php
 imsenterprise enrolment plugin installation.
 
file  lib.php
 IMS Enterprise file enrolment plugin.
 
file  locallib.php
 IMS Enterprise enrol plugin implementation.
 
file  messages.php
 Defines message providers (types of message sent) for the PayPal enrolment plugin.
 
file  provider.php
 Privacy Subsystem implementation for enrol_imsenterprise.
 
file  settings.php
 IMS Enterprise enrolments plugin settings and presets.
 
file  tasks.php
 Definition of IMS Enterprise enrolment scheduled tasks.
 
file  upgrade.php
 This file keeps track of upgrades to the imsenterprise enrolment plugin.
 
file  version.php
 IMS Enterprise file enrolment plugin version specification.
 

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? More...
 
 can_hide_show_instance ($instance)
 Is it possible to hide/show enrol instance via standard UI? More...
 
static decode_timeframe ($string)
 Process the INNER contents of a <timeframe> tag, to return beginning/ending dates. More...
 
 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. More...
 
 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. More...
 
 process_membership_tag ($tagcontents)
 Process the membership tag. More...
 
 process_properties_tag ($tagcontents)
 Process the properties tag. More...
 
 xmldb_enrol_imsenterprise_install ()
 Post installation procedure.
 
 xmldb_enrol_imsenterprise_upgrade ($oldversion)
 Performs upgrade of the database structure and data. More...
 

Variables

 $capabilities
 
 $messageproviders
 
 $plugin = 2020060900
 
 $tasks
 
$plugin component = 'enrol_imsenterprise'
 
$plugin version = 2020061500
 

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' => '*'
)
)