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_openai\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 OpenAI provider
27
 *
28
 * @package    aiprovider_openai
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_openai', [
40
            'prompttext' => 'privacy:metadata:aiprovider_openai:prompttext',
41
            'model' => 'privacy:metadata:aiprovider_openai:model',
42
            'numberimages' => 'privacy:metadata:aiprovider_openai:numberimages',
43
            'responseformat' => 'privacy:metadata:aiprovider_openai:responseformat',
44
        ], 'privacy:metadata:aiprovider_openai:externalpurpose');
45
        return $collection;
46
    }
47
 
48
    #[\Override]
49
    public static function get_contexts_for_userid(int $userid): contextlist {
50
        return new contextlist();
51
    }
52
 
53
    #[\Override]
54
    public static function get_users_in_context(userlist $userlist) {
55
    }
56
 
57
    #[\Override]
58
    public static function export_user_data(approved_contextlist $contextlist) {
59
    }
60
 
61
    #[\Override]
62
    public static function delete_data_for_all_users_in_context(\context $context) {
63
    }
64
 
65
    /**
66
     * Delete multiple users within a single context.
67
     *
68
     * @param approved_userlist $userlist The approved context and user information to delete information for.
69
     */
70
    public static function delete_data_for_users(approved_userlist $userlist) {
71
    }
72
 
73
    #[\Override]
74
    public static function delete_data_for_user(approved_contextlist $contextlist) {
75
    }
76
}