Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 362... Línea 362...
362
     * Helper method to set the path.
362
     * Helper method to set the path.
363
     *
363
     *
364
     * @param competency $parent The parent competency object.
364
     * @param competency $parent The parent competency object.
365
     * @return void
365
     * @return void
366
     */
366
     */
367
    protected function set_new_path(competency $parent = null) {
367
    protected function set_new_path(?competency $parent = null) {
368
        $path = '/0/';
368
        $path = '/0/';
369
        if ($this->get('parentid')) {
369
        if ($this->get('parentid')) {
370
            $parent = $parent !== null ? $parent : $this->get_parent();
370
            $parent = $parent !== null ? $parent : $this->get_parent();
371
            $path = $parent->get('path') . $this->get('parentid') . '/';
371
            $path = $parent->get('path') . $this->get('parentid') . '/';
372
        }
372
        }