Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of Moodle - https://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 <https://www.gnu.org/licenses/>.
16
 
17
/**
18
 * Plugin version and other meta-data are defined here.
19
 *
20
 * @package     mod_stickynotes
21
 * @copyright   2021 Olivier VALENTIN
22
 * @license     https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
24
 
25
defined('MOODLE_INTERNAL') || die;
26
 
27
$capabilities = array(
28
    'mod/stickynotes:view' => array(
29
        'captype' => 'read',
30
        'contextlevel' => CONTEXT_MODULE,
31
        'archetypes' => array(
32
            'guest' => CAP_ALLOW,
33
            'user' => CAP_ALLOW,
34
        )
35
    ),
36
 
37
    'mod/stickynotes:addinstance' => array(
38
        'riskbitmask' => RISK_XSS,
39
 
40
        'captype' => 'write',
41
        'contextlevel' => CONTEXT_COURSE,
42
        'archetypes' => array(
43
            'teacher' => CAP_ALLOW,
44
            'editingteacher' => CAP_ALLOW,
45
            'manager' => CAP_ALLOW
46
        ),
47
        'clonepermissionsfrom' => 'moodle/course:manageactivities'
48
    ),
49
 
50
        'mod/stickynotes:createnote' => array(
51
 
52
        'captype' => 'write',
53
        'contextlevel' => CONTEXT_MODULE,
54
        'archetypes' => array(
55
            'student' => CAP_ALLOW,
56
            'teacher' => CAP_ALLOW,
57
            'editingteacher' => CAP_ALLOW,
58
            'manager' => CAP_ALLOW
59
        )
60
    ),
61
 
62
    'mod/stickynotes:updateanynote' => array(
63
 
64
        'captype' => 'write',
65
        'contextlevel' => CONTEXT_MODULE,
66
        'archetypes' => array(
67
            'teacher' => CAP_ALLOW,
68
            'editingteacher' => CAP_ALLOW,
69
            'manager' => CAP_ALLOW
70
        )
71
    ),
72
 
73
    'mod/stickynotes:updateownnote' => array(
74
 
75
        'captype' => 'write',
76
        'contextlevel' => CONTEXT_MODULE,
77
        'archetypes' => array(
78
            'student' => CAP_ALLOW,
79
            'teacher' => CAP_ALLOW,
80
            'editingteacher' => CAP_ALLOW,
81
            'manager' => CAP_ALLOW
82
        )
83
    ),
84
 
85
    'mod/stickynotes:deleteanynote' => array(
86
 
87
        'captype' => 'write',
88
        'contextlevel' => CONTEXT_MODULE,
89
        'archetypes' => array(
90
            'teacher' => CAP_ALLOW,
91
            'editingteacher' => CAP_ALLOW,
92
            'manager' => CAP_ALLOW
93
        )
94
    ),
95
 
96
    'mod/stickynotes:deleteownnote' => array(
97
 
98
        'captype' => 'write',
99
        'contextlevel' => CONTEXT_MODULE,
100
        'archetypes' => array(
101
            'student' => CAP_ALLOW,
102
            'teacher' => CAP_ALLOW,
103
            'editingteacher' => CAP_ALLOW,
104
            'manager' => CAP_ALLOW
105
        )
106
    ),
107
 
108
    'mod/stickynotes:managecolumn' => array(
109
 
110
        'captype' => 'write',
111
        'contextlevel' => CONTEXT_MODULE,
112
        'archetypes' => array(
113
            'teacher' => CAP_ALLOW,
114
            'editingteacher' => CAP_ALLOW,
115
            'manager' => CAP_ALLOW
116
        )
117
    ),
118
 
119
        'mod/stickynotes:vote' => array(
120
 
121
        'captype' => 'write',
122
        'contextlevel' => CONTEXT_MODULE,
123
        'archetypes' => array(
124
            'student' => CAP_ALLOW,
125
            'teacher' => CAP_ALLOW,
126
            'editingteacher' => CAP_ALLOW,
127
            'manager' => CAP_ALLOW
128
        )
129
    ),
130
 
131
        'mod/stickynotes:viewauthor' => array(
132
 
133
        'captype' => 'write',
134
        'contextlevel' => CONTEXT_MODULE,
135
        'archetypes' => array(
136
            'teacher' => CAP_ALLOW,
137
            'editingteacher' => CAP_ALLOW,
138
            'manager' => CAP_ALLOW
139
        )
140
    ),
141
 
142
        'mod/stickynotes:export' => array(
143
 
144
        'captype' => 'write',
145
        'contextlevel' => CONTEXT_MODULE,
146
        'archetypes' => array(
147
            'teacher' => CAP_ALLOW,
148
            'editingteacher' => CAP_ALLOW,
149
            'manager' => CAP_ALLOW
150
        )
151
    ),
152
);