protected function define_grade_subplugin_structure()

in backup/moodle2/backup_assignfeedback_onenote_subplugin.class.php [46:62]


    protected function define_grade_subplugin_structure() {

        // Create XML elements.
        $subplugin = $this->get_subplugin_element();
        $subpluginwrapper = new backup_nested_element($this->get_recommended_name());
        $subpluginelement = new backup_nested_element('feedback_onenote', null, array('numfiles', 'grade'));

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

        // Set source to populate the data.
        $subpluginelement->set_source_table('assignfeedback_onenote', array('grade' => backup::VAR_PARENTID));
        // The parent is the grade.
        $subpluginelement->annotate_files('assignfeedback_onenote', 'feedback_files', 'grade');
        return $subplugin;
    }