Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
// This file is part of Moodle - http://moodle.org/
4
//
5
// Moodle is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// Moodle is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
17
 
18
/**
19
 * @package    workshopeval
20
 * @subpackage best
21
 * @copyright  2010 David Mudrak <david@moodle.com>
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
24
defined('MOODLE_INTERNAL') || die();
25
 
26
/**
27
 * Provides the information to backup grading evaluation method 'Comparison with the best assessment'
28
 *
29
 * This evaluator just stores a single integer value - the recently used comparison
30
 * strictness factor. It adds its XML data to workshop tag.
31
 */
32
class backup_workshopeval_best_subplugin extends backup_subplugin {
33
 
34
    /**
35
     * Returns the subplugin information to attach to workshop element
36
     */
37
    protected function define_workshop_subplugin_structure() {
38
 
39
        // create XML elements
40
        $subplugin = $this->get_subplugin_element(); // virtual optigroup element
41
        $subplugin_wrapper = new backup_nested_element($this->get_recommended_name());
42
        $subplugin_table_settings = new backup_nested_element('workshopeval_best_settings', null, array('comparison'));
43
 
44
        // connect XML elements into the tree
45
        $subplugin->add_child($subplugin_wrapper);
46
        $subplugin_wrapper->add_child($subplugin_table_settings);
47
 
48
        // set source to populate the data
49
        $subplugin_table_settings->set_source_table('workshopeval_best_settings', array('workshopid' => backup::VAR_ACTIVITYID));
50
 
51
        return $subplugin;
52
    }
53
}