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 - http://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 <http://www.gnu.org/licenses/>.
16
 
17
namespace core_ai\table;
18
 
19
use moodle_url;
20
 
21
/**
22
 * Table to manage AI Placement plugins.
23
 *
24
 * @package core_ai
25
 * @copyright 2024 Matt Porritt <matt.porritt@moodle.com>
26
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27
 */
28
class aiplacement_management_table extends \core_admin\table\plugin_management_table {
29
 
30
    #[\Override]
31
    protected function get_plugintype(): string {
32
        return 'aiplacement';
33
    }
34
 
35
    #[\Override]
36
    protected function get_action_url(array $params = []): moodle_url {
37
        return new moodle_url('/admin/ai.php', $params);
38
    }
39
 
40
    #[\Override]
41
    protected function get_column_list(): array {
42
        $columns = [
43
            'name' => get_string('placement', 'core_ai'),
44
        ];
45
 
46
        if ($this->supports_disabling()) {
47
            $columns['enabled'] = get_string('pluginenabled', 'core_plugin');
48
        }
49
 
50
        if ($this->supports_ordering()) {
51
            $columns['order'] = get_string('order', 'core');
52
        }
53
 
54
        $columns['settings'] = get_string('settings', 'core');
55
        $columns['uninstall'] = get_string('uninstallplugin', 'core_admin');
56
 
57
        return $columns;
58
    }
59
}