Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Provides Common Cartridge v1 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

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

imscc1_convert_exception:: (0 methods):


Class: imscc1_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_IMSCC1 if the Common Cartridge 1.0 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: imscc1_convert_exception  - X-Ref

Exception thrown by this converter