Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
// This file is part of Moodle - https://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <https://www.gnu.org/licenses/>.
16
 
17
defined('MOODLE_INTERNAL') || die();
18
 
19
/**
20
 * The task that provides a complete restore of mod_subsection is defined here.
21
 *
22
 * @package     mod_subsection
23
 * @category    backup
24
 * @copyright   2023 Amaia Anabitarte <amaia@moodle.com>
25
 * @license     https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26
 */
27
 
28
// More information about the backup process: {@link https://docs.moodle.org/dev/Backup_API}.
29
// More information about the restore process: {@link https://docs.moodle.org/dev/Restore_API}.
30
 
31
require_once($CFG->dirroot.'//mod/subsection/backup/moodle2/restore_subsection_stepslib.php');
32
 
33
/**
34
 * Restore task for mod_subsection.
35
 */
36
class restore_subsection_activity_task extends restore_activity_task {
37
 
38
    /**
39
     * Defines particular settings that this activity can have.
40
     */
41
    protected function define_my_settings() {
42
        return;
43
    }
44
 
45
    /**
46
     * Defines particular steps that this activity can have.
47
     *
48
     * @return base_step.
49
     */
50
    protected function define_my_steps() {
51
        $this->add_step(new restore_subsection_activity_structure_step('subsection_structure', 'subsection.xml'));
52
    }
53
 
54
    /**
55
     * Defines the contents in the activity that must be processed by the link decoder.
56
     *
57
     * @return array.
58
     */
59
    public static function define_decode_contents() {
60
        $contents = [];
61
 
62
        // Define the contents.
63
 
64
        return $contents;
65
    }
66
 
67
    /**
68
     * Defines the decoding rules for links belonging to the activity to be executed by the link decoder.
69
     *
70
     * @return array.
71
     */
72
    public static function define_decode_rules() {
73
        $rules = [];
74
 
75
        // Define the rules.
76
 
77
        return $rules;
78
    }
79
 
80
    /**
81
     * Defines the restore log rules that will be applied by the
82
     * {@see restore_logs_processor} when restoring mod_subsection logs. It
83
     * must return one array of {@see restore_log_rule} objects.
84
     *
85
     * @return array.
86
     */
87
    public static function define_restore_log_rules() {
88
        $rules = [];
89
 
90
        // Define the rules.
91
 
92
        return $rules;
93
    }
94
}