Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 18... Línea 18...
18
 
18
 
Línea 19... Línea 19...
19
namespace core_course\reportbuilder\local\formatters;
19
namespace core_course\reportbuilder\local\formatters;
20
 
20
 
21
use core_user\output\status_field;
-
 
Línea 22... Línea 21...
22
use lang_string;
21
use core_user\output\status_field;
23
use stdClass;
22
use lang_string;
24
 
23
 
25
/**
24
/**
Línea 30... Línea 29...
30
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
29
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
31
 */
30
 */
32
class enrolment {
31
class enrolment {
Línea 33... Línea 32...
33
 
32
 
34
    /**
-
 
35
     * Return enrolment plugin instance name
-
 
36
     *
-
 
37
     * @param string|null $value
-
 
38
     * @param stdClass $row
-
 
39
     * @return string
-
 
40
     *
33
    /**
41
     * @deprecated since Moodle 4.3 - please do not use this function any more (to remove in MDL-78118)
34
     * @deprecated since Moodle 4.3 - please do not use this function any more (to remove in MDL-78118)
42
     */
-
 
43
    public static function enrolment_name(?string $value, stdClass $row): string {
-
 
44
        global $DB;
-
 
45
 
-
 
46
        if (empty($value)) {
-
 
47
            return '';
-
 
48
        }
-
 
49
 
35
     */
50
        $instance = $DB->get_record('enrol', ['id' => $row->id, 'enrol' => $row->enrol], '*', MUST_EXIST);
36
    #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-76900', final: true)]
51
        $plugin = enrol_get_plugin($row->enrol);
-
 
52
 
37
    public static function enrolment_name(): void {
53
        return $plugin ? $plugin->get_instance_name($instance) : '-';
38
        \core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
Línea 54... Línea 39...
54
    }
39
    }
55
 
40
 
56
    /**
41
    /**