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

Public Member Functions

 get_paths ()
 process_resource (array $data, array $raw)
 on_resource_end (array $data)

Protected Member Functions

 get_successor ($type, $reference)
 internal implementation details follow /////////////////////////////////

Protected Attributes

 $fileman = null

Detailed Description

Resource conversion handler

Definition at line 32 of file lib.php.


Member Function Documentation

get_paths ( )

Declare the paths in moodle.xml we are able to convert

The method returns list of convert_path instances. For each path returned, the corresponding conversion method must be defined.

Note that the paths /MOODLE_BACKUP/COURSE/MODULES/MOD/RESOURCE do not actually exist in the file. The last element with the module name was appended by the moodle1_converter class.

Returns:
array of convert_path instances

Definition at line 53 of file lib.php.

get_successor ( type,
reference 
) [protected]

internal implementation details follow /////////////////////////////////

Returns the handler of the new 2.0 mod type according the given type of the legacy 1.9 resource

Parameters:
string$typethe value of the 'type' field in 1.9 resource
string$referencea file path. Necessary to differentiate files from web URLs
Exceptions:
moodle1_convert_exceptionfor the unknown types
Returns:
null|moodle1_mod_handler the instance of the handler, or null if the type does not have a successor

Definition at line 240 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

on_resource_end ( array data)

Give succesors a chance to finish their job

Definition at line 224 of file lib.php.

Here is the call graph for this function:

process_resource ( array data,
array raw 
)

Converts /MOODLE_BACKUP/COURSE/MODULES/MOD/RESOURCE data

This methods detects the resource type and eventually re-dispatches it to the corresponding resource successor (url, forum, page, imscp).

Definition at line 78 of file lib.php.

Here is the call graph for this function:


Field Documentation

$fileman = null [protected]

Definition at line 35 of file lib.php.


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