A PHP library to parse files within a Moodle course backup MBZ
archive.
Generate static pages compatible with October.
NOTE: this is not a plugin for Moodle! It is a standalone library.
License — to be confirmed!
This library is a work-in-progress – though with working unit tests!
Initial limitations:
MBZ
archive file needs to be unzipped already;- Expecting the 'newer' backup format (
.tar.gz
as opposed to.zip
) - Test source is Moodle 2.9.3—2.9.5 (
Learn3.open.ac.uk
) - See feature / todo list.
Install and test using Git and Composer,
git clone https://github.com/IET-OU/moodle-backup-parser
composer install
composer test
<?php
require_once './vendor/autoload.php';
$parser = new \Nfreear\MoodleBackupParser\Parser();
$dumper = new \Nfreear\MoodleBackupParser\StaticPages();
$result = $parser->parse('./backup');
$result = $dumper->putContents('./static_pages', $parser->getPages());
printf("End. Parsed: %s\n", $parser->getMetaData()->name);
© 2016 The Open University (Institute of Educational Technology).