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

Public Member Functions

 __construct ($course, $cm, $module, $directory)
 get_directory ()
 data_preset_get_file_contents (&$filestorage, &$fileobj, $dir, $filename)
 get_preset_settings ()
 import ($overwritesettings)
 cleanup ()

Protected Attributes

 $course
 $cm
 $module
 $directory

Detailed Description

Abstract class used for data preset importers

Definition at line 2129 of file lib.php.


Constructor & Destructor Documentation

__construct ( course,
cm,
module,
directory 
)

Constructor

Parameters:
stdClass$course
stdClass$cm
stdClass$module
string$directory

Reimplemented in data_preset_existing_importer, and data_preset_upload_importer.

Definition at line 2144 of file lib.php.


Member Function Documentation

cleanup ( )

Any clean up routines should go here

Returns:
bool

Reimplemented in data_preset_upload_importer.

Definition at line 2398 of file lib.php.

Here is the caller graph for this function:

data_preset_get_file_contents ( &$  filestorage,
&$  fileobj,
dir,
filename 
)

Retreive the contents of a file. That file may either be in a conventional directory of the Moodle file storage

Parameters:
file_storage$filestorage,.should be null if using a conventional directory
stored_file$fileobjthe directory to look in. null if using a conventional directory
string$dirthe directory to look in. null if using the Moodle file storage
string$filenamethe name of the file we want
Returns:
string the contents of the file

Definition at line 2167 of file lib.php.

Here is the caller graph for this function:

Returns the name of the directory the preset is located in

Returns:
string

Definition at line 2155 of file lib.php.

Here is the caller graph for this function:

Gets the preset settings moodle_database $DB

Returns:
stdClass

Definition at line 2184 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

import ( overwritesettings)

Import the preset into the given database module

Returns:
bool

Definition at line 2292 of file lib.php.

Here is the call graph for this function:


Field Documentation

$cm [protected]

Definition at line 2132 of file lib.php.

$course [protected]

Definition at line 2131 of file lib.php.

$directory [protected]

Definition at line 2134 of file lib.php.

$module [protected]

Definition at line 2133 of file lib.php.


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