protected function define_submission_subplugin_structure()

in backup/moodle2/backup_assignsubmission_onenote_subplugin.class.php [41:57]


    protected function define_submission_subplugin_structure() {
        // Create XML elements.
        $subplugin = $this->get_subplugin_element();
        $subpluginwrapper = new backup_nested_element($this->get_recommended_name());
        $subpluginelement = new backup_nested_element('submission_onenote', null, array('numfiles', 'submission'));

        // Connect XML elements into the tree.
        $subplugin->add_child($subpluginwrapper);
        $subpluginwrapper->add_child($subpluginelement);

        // Set source to populate the data.
        $subpluginelement->set_source_table('assignsubmission_onenote', array('submission' => backup::VAR_PARENTID));

        // The parent is the submission.
        $subpluginelement->annotate_files('assignsubmission_onenote', 'submission_onenotes', 'submission');
        return $subplugin;
    }