Permalink
Browse files

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

  • Loading branch information...
1 parent 5af8804 commit 653bc98b0e79b619826bf16eea785b9e06677664 @mrmark mrmark committed with mudrd8mz Mar 11, 2011
@@ -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 @@ public function build_plan() {
$this->xmlparser->set_processor($this->xmlprocessor);
- $xmlparser->process(); // @todo When to really do this?
+ $this->xmlparser->process(); // @todo When to really do this?
}
}
@@ -48,7 +48,9 @@ public function delete_convertdir() {
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() {
@@ -6,6 +6,9 @@
}
// 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/util/xml/parser/progressive_parser.class.php');
// And some moodle stuff too
-require_once($CFG->libdir.'/fileslib.php');
+require_once($CFG->libdir.'/filelib.php');

0 comments on commit 653bc98

Please sign in to comment.