public function __construct($restoreid)
 {
     $this->restoreid = $restoreid;
     parent::__construct(array());
     // Set the paths we are interested on, returning all them grouped under user
     $this->add_path('/roles_definition/role');
 }
 public function __construct($restoreid)
 {
     $this->restoreid = $restoreid;
     $this->lastcatid = 0;
     parent::__construct(array());
     // Set the paths we are interested on
     $this->add_path('/question_categories/question_category');
     $this->add_path('/question_categories/question_category/questions/question');
 }
 public function __construct($restoreid)
 {
     $this->restoreid = $restoreid;
     parent::__construct(array());
     // Get itemnames handled by inforef files
     $items = backup_helper::get_inforef_itemnames();
     // Let's add all them as target paths for the processor
     foreach ($items as $itemname) {
         $pathvalue = '/inforef/' . $itemname . 'ref/' . $itemname;
         $this->add_path($pathvalue);
     }
 }
 public function __construct($restoreid)
 {
     $this->restoreid = $restoreid;
     parent::__construct(array());
     // Set the paths we are interested on, returning all them grouped under user
     $this->add_path('/users/user', true);
     $this->add_path('/users/user/custom_fields/custom_field');
     $this->add_path('/users/user/tags/tag');
     $this->add_path('/users/user/preferences/preference');
     // As noted above, we skip user context ras and caps
     // $this->add_path('/users/user/roles/role_overrides/override');
     // $this->add_path('/users/user/roles/role_assignments/assignment');
 }
 public function __construct()
 {
     $this->accumchunks = array();
     parent::__construct();
     // Let's add all the paths we are interested on
     $this->add_path('/moodle_backup/information', true);
     // Everything will be grouped below this
     $this->add_path('/moodle_backup/information/details/detail');
     $this->add_path('/moodle_backup/information/contents/activities/activity');
     $this->add_path('/moodle_backup/information/contents/sections/section');
     $this->add_path('/moodle_backup/information/contents/course');
     $this->add_path('/moodle_backup/information/settings/setting');
 }
예제 #6
0
파일: lib.php 프로젝트: ncsu-delta/moodle
 public function __construct(moodle1_converter $converter) {
     $this->converter = $converter;
     parent::__construct();
 }
 /**
  * Override this method so we'll be able to skip
  * dispatching some well-known chunks, like the
  * ones being 100% part of subplugins stuff. Useful
  * for allowing development without having all the
  * possible restore subplugins defined
  */
 protected function postprocess_chunk($data)
 {
     // Iterate over all the data tags, if any of them is
     // not 'subplugin_XXXX' or has value, then it's a valid chunk,
     // pass it to standard (parent) processing of chunks.
     foreach ($data['tags'] as $key => $value) {
         if (trim($value) !== '' || strpos($key, 'subplugin_') !== 0) {
             parent::postprocess_chunk($data);
             return;
         }
     }
     // Arrived here, all the tags correspond to sublplugins and are empty,
     // skip the chunk, and debug_developer notice
     $this->chunks--;
     // not counted
     debugging('Missing support on restore for ' . clean_param($data['path'], PARAM_PATH) . ' subplugin (' . implode(', ', array_keys($data['tags'])) . ')', DEBUG_DEVELOPER);
 }