Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Provides Common Cartridge v1.1 converter class

Copyright: 2011 Darko Miletic <dmiletic@moodlerooms.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 131 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

imscc11_converter:: (4 methods):
  log()
  detect_format()
  description()
  execute()

imscc11_convert_exception:: (0 methods):


Class: imscc11_converter  - X-Ref

log($message, $level, $a = null, $depth = null, $display = false)   X-Ref
Log a message

param: string $message message text
param: int $level message level {@example backup::LOG_WARNING}
param: null|mixed $a additional information
param: null|int $depth the message depth
param: bool $display whether the message should be sent to the output, too

detect_format($tempdir)   X-Ref
Detects the Common Cartridge 1.0 format of the backup directory

param: string $tempdir the name of the backup directory
return: null|string backup::FORMAT_IMSCC11 if the Common Cartridge 1.1 is detected, null otherwise

description()   X-Ref
Returns the basic information about the converter

The returned array must contain the following keys:
'from' - the supported source format, eg. backup::FORMAT_MOODLE1
'to'   - the supported target format, eg. backup::FORMAT_MOODLE
'cost' - the cost of the conversion, non-negative non-zero integer

execute()   X-Ref
No description

Class: imscc11_convert_exception  - X-Ref

Exception thrown by this converter