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

Public Member Functions

 instance_deleteable ($instance)
 sync_user_enrolments ($user)
 sync_enrolments ($verbose=false)
 sync_courses ($verbose=false)

Protected Member Functions

 db_get_sql ($table, array $conditions, array $fields, $distinct=false, $sort="")
 db_init ()
 db_addslashes ($text)
 db_encode ($text)
 db_decode ($text)

Detailed Description

Database enrolment plugin implementation.

Author:
Petr Skoda - based on code by Martin Dougiamas, Martin Langhoff and others http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Definition at line 35 of file lib.php.


Member Function Documentation

db_addslashes ( text) [protected]

Definition at line 762 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

db_decode ( text) [protected]

Definition at line 788 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

db_encode ( text) [protected]

Definition at line 773 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

db_get_sql ( table,
array conditions,
array fields,
distinct = false,
sort = "" 
) [protected]

Definition at line 712 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

db_init ( ) [protected]

Tries to make connection to the external database.

Returns:
null|ADONewConnection

Definition at line 738 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

instance_deleteable ( instance)

Is it possible to delete enrol instance via standard UI?

Parameters:
object$instance
Returns:
bool

Reimplemented from enrol_plugin.

Definition at line 42 of file lib.php.

Here is the call graph for this function:

sync_courses ( verbose = false)

Performs a full sync with external database.

First it creates new courses if necessary, then enrols and unenrols users.

Parameters:
bool$verbose
Returns:
int 0 means success, 1 db connect failure, 4 db read failure

Definition at line 557 of file lib.php.

Here is the call graph for this function:

sync_enrolments ( verbose = false)

Forces synchronisation of all enrolments with external database.

Parameters:
bool$verbose
Returns:
int 0 means success, 1 db connect failure, 2 db read failure

Definition at line 250 of file lib.php.

Here is the call graph for this function:

sync_user_enrolments ( user)

Forces synchronisation of user enrolments with external database, does not create new courses.

Parameters:
object$useruser record
Returns:
void

Reimplemented from enrol_plugin.

Definition at line 61 of file lib.php.

Here is the call graph for this function:


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