Moodle  2.2.1
http://www.collinsharper.com
enrol_imsenterprise_plugin Class Reference
Inheritance diagram for enrol_imsenterprise_plugin:
Collaboration diagram for enrol_imsenterprise_plugin:

Public Member Functions

 cron ()
 full_tag_found_in_cache ($tagname, $latestline)
 remove_tag_from_cache ($tagname)
 get_recstatus ($tagdata, $tagname)
 process_group_tag ($tagcontents)
 process_person_tag ($tagcontents)
 process_membership_tag ($tagcontents)
 process_properties_tag ($tagcontents)
 log_line ($string)
 decode_timeframe ($string)
 load_role_mappings ()

Data Fields

 $log

Detailed Description

Definition at line 55 of file lib.php.


Member Function Documentation

cron ( )

Read in an IMS Enterprise file. Originally designed to handle v1.1 files but should be able to handle earlier types as well, I believe.

Reimplemented from enrol_plugin.

Definition at line 66 of file lib.php.

Here is the call graph for this function:

decode_timeframe ( string)

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

Definition at line 758 of file lib.php.

Here is the caller graph for this function:

full_tag_found_in_cache ( tagname,
latestline 
)

Check if a complete tag is found in the cached data, which usually happens when the end of the tag has only just been loaded into the cache. Returns either false, or the contents of the tag (including start and end).

Parameters:
string$tagnameName of tag to look for
string$latestlineThe very last line in the cache (used for speeding up the match)

Definition at line 265 of file lib.php.

Here is the caller graph for this function:

get_recstatus ( tagdata,
tagname 
)

Very simple convenience function to return the "recstatus" found in person/group/role tags. 1=Add, 2=Update, 3=Delete, as specified by IMS, and we also use 0 to indicate "unspecified".

Parameters:
string$tagdatathe tag XML data
string$tagnamethe name of the tag we're interested in

Definition at line 291 of file lib.php.

Here is the caller graph for this function:

Load the role mappings (from the config), so we can easily refer to how an IMS-E role corresponds to a Moodle role

Definition at line 777 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

log_line ( string)

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)

Definition at line 748 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

process_group_tag ( tagcontents)

Process the group tag. This defines a Moodle course.

Parameters:
string$tagconentsThe raw contents of the XML element

Definition at line 305 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

process_membership_tag ( tagcontents)

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

Parameters:
string$tagconentsThe raw contents of the XML element

Definition at line 580 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

process_person_tag ( tagcontents)

Process the person tag. This defines a Moodle user.

Parameters:
string$tagconentsThe raw contents of the XML element

Definition at line 453 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

process_properties_tag ( tagcontents)

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

Parameters:
string$tagconentsThe raw contents of the XML element

Definition at line 731 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

remove_tag_from_cache ( tagname)

Remove complete tag from the cached data (including all its contents) - so that the cache doesn't grow to unmanageable size

Parameters:
string$tagnameName of tag to look for

echo "<p>remove_tag_from_cache: $tagname</p>"; flush(); ob_flush();

Definition at line 278 of file lib.php.

Here is the caller graph for this function:


Field Documentation

$log

Definition at line 57 of file lib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations