Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.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