mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Minor fixes and added more methods
This commit is contained in:
parent
17252e2d8a
commit
7336701ff1
2 changed files with 9 additions and 6 deletions
|
@ -33,13 +33,13 @@ abstract class base_converter {
|
|||
public function get_convertdir() {
|
||||
global $CFG;
|
||||
|
||||
return "$CFG->dirroot/backup/temp/$this->convertdir";
|
||||
return "$CFG->dataroot/temp/backup/$this->convertdir";
|
||||
}
|
||||
|
||||
public function get_tempdir() {
|
||||
global $CFG;
|
||||
|
||||
return "$CFG->dirroot/backup/temp/$this->tempdir";
|
||||
return "$CFG->dataroot/temp/backup/$this->tempdir";
|
||||
}
|
||||
|
||||
public function delete_convertdir() {
|
||||
|
|
|
@ -3,14 +3,13 @@
|
|||
* Convert Plan
|
||||
*/
|
||||
class convert_plan extends base_plan implements loggable {
|
||||
|
||||
/**
|
||||
* @var plan_converter
|
||||
*/
|
||||
protected $converter;
|
||||
|
||||
public function __construct(plan_converter $converter) {
|
||||
global $CFG;
|
||||
|
||||
$this->converter = $converter;
|
||||
$this->basepath = $CFG->dataroot . '/temp/backup/' . $converter->get_backupid();
|
||||
parent::__construct('convert_plan');
|
||||
}
|
||||
|
||||
|
@ -23,6 +22,10 @@ class convert_plan extends base_plan implements loggable {
|
|||
// TODO: Implement log() method.
|
||||
}
|
||||
|
||||
public function get_basepath() {
|
||||
return $this->converter->get_convertdir();
|
||||
}
|
||||
|
||||
public function get_converterid() {
|
||||
return $this->converter->get_id();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue