Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 105... Línea 105...
105
    public function get_releasesession() {
105
    public function get_releasesession() {
106
        return $this->releasesession;
106
        return $this->releasesession;
107
    }
107
    }
Línea 108... Línea 108...
108
 
108
 
109
    /**
-
 
110
     * Store extra data for course copy operations.
-
 
111
     *
-
 
112
     * For a course copying these is data required to be passed to the restore step.
-
 
113
     * We store this data in its own section of the backup controller
-
 
114
     *
-
 
115
     * @param \stdClass $data The course copy data.
-
 
116
     * @throws backup_controller_exception
109
    /**
117
     * @deprecated since Moodle 4.1 MDL-74548 - please do not use this method anymore.
-
 
118
     * @todo MDL-75025 This method will be deleted in Moodle 4.5
-
 
119
     * @see restore_controller::__construct()
110
     * @deprecated since Moodle 4.1 MDL-74548
120
     */
-
 
121
    public function set_copy(\stdClass $data): void {
-
 
122
        debugging('The method base_controller::set_copy() is deprecated.
111
     */
123
            Please use the restore_controller class instead.', DEBUG_DEVELOPER);
-
 
124
        // Only allow setting of copy data when controller is in copy mode.
112
    #[\core\attribute\deprecated(since: '4.1', mdl: 'MDL-74548', final: true)]
125
        if ($this->mode != backup::MODE_COPY) {
113
    public function set_copy(): void {
126
            throw new backup_controller_exception('cannot_set_copy_vars_wrong_mode');
-
 
127
        }
-
 
128
        $this->copy = $data;
114
        \core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
Línea 129... Línea 115...
129
    }
115
    }
130
 
-
 
131
    /**
-
 
132
     * Get the course copy data.
-
 
133
     *
116
 
134
     * @return \stdClass
-
 
135
     * @deprecated since Moodle 4.1 MDL-74548 - please do not use this method anymore.
-
 
136
     * @todo MDL-75026 This method will be deleted in Moodle 4.5
117
    /**
-
 
118
     * @deprecated since Moodle 4.1 MDL-74548
137
     * @see restore_controller::get_copy()
119
     */
138
     */
-
 
139
    public function get_copy(): \stdClass {
120
    #[\core\attribute\deprecated('restore_controller::get_copy()', since: '4.1', mdl: 'MDL-74548', final: true)]
140
        debugging('The method base_controller::get_copy() is deprecated.
-
 
141
           Please use restore_controller::get_copy() instead.', DEBUG_DEVELOPER);
121
    public function get_copy() {
142
        return $this->copy;
122
        \core\deprecation::emit_deprecation([self::class, __FUNCTION__]);