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 aiprovider_ollama\privacy;
18
 
19
use core_privacy\local\metadata\collection;
20
use core_privacy\local\request\approved_contextlist;
21
use core_privacy\local\request\approved_userlist;
22
use core_privacy\local\request\contextlist;
23
use core_privacy\local\request\userlist;
24
 
25
/**
26
 * Privacy provider implementation for Ollama provider
27
 *
28
 * @package    aiprovider_ollama
29
 * @copyright  2024 Matt Porritt <matt.porritt@moodle.com>
30
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
31
 * @codeCoverageIgnore
32
 */
33
class provider implements
34
    \core_privacy\local\metadata\provider,
35
    \core_privacy\local\request\core_userlist_provider,
36
    \core_privacy\local\request\plugin\provider {
37
    #[\Override]
38
    public static function get_metadata(collection $collection): collection {
39
        $collection->add_external_location_link('aiprovider_ollama', [
40
            'prompttext' => 'privacy:metadata:aiprovider_ollama:prompttext',
41
            'model' => 'privacy:metadata:aiprovider_ollama:model',
42
        ], 'privacy:metadata:aiprovider_ollama:externalpurpose');
43
        return $collection;
44
    }
45
 
46
    #[\Override]
47
    public static function get_contexts_for_userid(int $userid): contextlist {
48
        return new contextlist();
49
    }
50
 
51
    #[\Override]
52
    public static function get_users_in_context(userlist $userlist) {
53
    }
54
 
55
    #[\Override]
56
    public static function export_user_data(approved_contextlist $contextlist) {
57
    }
58
 
59
    #[\Override]
60
    public static function delete_data_for_all_users_in_context(\context $context) {
61
    }
62
 
63
    /**
64
     * Delete multiple users within a single context.
65
     *
66
     * @param approved_userlist $userlist The approved context and user information to delete information for.
67
     */
68
    public static function delete_data_for_users(approved_userlist $userlist) {
69
    }
70
 
71
    #[\Override]
72
    public static function delete_data_for_user(approved_contextlist $contextlist) {
73
    }
74
}