Fixing several bugs while actually trying to execute some of the code

This commit is contained in:
Mark Nielsen 2011-03-11 11:18:23 -08:00 committed by David Mudrak
parent 5af8804415
commit 653bc98b0e
4 changed files with 9 additions and 4 deletions

View File

@ -2,7 +2,7 @@
/**
* This will be the Moodle 1 to Moodle 2 Converter
*/
abstract class moodle1_converter extends plan_converter {
class moodle1_converter extends plan_converter {
/**
* @return boolean
*/
@ -32,6 +32,6 @@ abstract class moodle1_converter extends plan_converter {
$this->xmlparser->set_processor($this->xmlprocessor);
$xmlparser->process(); // @todo When to really do this?
$this->xmlparser->process(); // @todo When to really do this?
}
}

View File

@ -48,7 +48,9 @@ abstract class base_converter {
public function create_convertdir() {
$this->delete_convertdir();
make_upload_directory($this->get_convertdir());
if (!check_dir_exists($this->get_convertdir())) {
throw new backup_exception('failedtomakeconvertdir'); // @todo Define this string
}
}
public function replace_tempdir() {

View File

@ -6,6 +6,9 @@ if (!defined('MOODLE_INTERNAL')) {
}
// Include all the convert stuff needed
require_once($CFG->dirroot . '/backup/util/interfaces/checksumable.class.php');
require_once($CFG->dirroot . '/backup/util/interfaces/executable.class.php');
require_once($CFG->dirroot . '/backup/util/interfaces/loggable.class.php');
require_once($CFG->dirroot.'/backup/backup.class.php');
require_once($CFG->dirroot.'/backup/util/factories/convert_factory.class.php');
require_once($CFG->dirroot.'/backup/util/converter/base_converter.class.php');
@ -28,4 +31,4 @@ require_once($CFG->dirroot.'/backup/moodle2/convert_stepslib.php');
require_once($CFG->dirroot.'/backup/util/xml/parser/progressive_parser.class.php');
// And some moodle stuff too
require_once($CFG->libdir.'/fileslib.php');
require_once($CFG->libdir.'/filelib.php');