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 the Zoom plugin for 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
/**
18
 * Capability definitions for the zoom module
19
 *
20
 * The capabilities are loaded into the database table when the module is
21
 * installed or updated. Whenever the capability definitions are updated,
22
 * the module version number should be bumped up.
23
 *
24
 * The system has four possible values for a capability:
25
 * CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
26
 *
27
 * It is important that capability names are unique. The naming convention
28
 * for capabilities that are specific to modules and blocks is as follows:
29
 *   [mod/block]/<plugin_name>:<capabilityname>
30
 *
31
 * component_name should be the same as the directory name of the mod or block.
32
 *
33
 * Core moodle capabilities are defined thus:
34
 *    moodle/<capabilityclass>:<capabilityname>
35
 *
36
 * Examples: mod/forum:viewpost
37
 *           block/recent_activity:view
38
 *           moodle/site:deleteuser
39
 *
40
 * The variable name for the capability definitions array is $capabilities
41
 *
42
 * @package    mod_zoom
43
 * @copyright  2015 UC Regents
44
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
45
 */
46
 
47
defined('MOODLE_INTERNAL') || die();
48
 
49
// Modify capabilities as needed and remove this comment.
50
$capabilities = [
51
    'mod/zoom:addinstance' => [
52
        'riskbitmask' => RISK_XSS,
53
        'captype' => 'write',
54
        'contextlevel' => CONTEXT_COURSE,
55
        'archetypes' => [
56
            'editingteacher' => CAP_ALLOW,
57
            'manager' => CAP_ALLOW,
58
        ],
59
        'clonepermissionsfrom' => 'moodle/course:manageactivities',
60
    ],
61
 
62
    'mod/zoom:view' => [
63
        'captype' => 'read',
64
        'contextlevel' => CONTEXT_MODULE,
65
        'legacy' => [
66
            'guest' => CAP_ALLOW,
67
            'student' => CAP_ALLOW,
68
            'teacher' => CAP_ALLOW,
69
            'editingteacher' => CAP_ALLOW,
70
            'manager' => CAP_ALLOW,
71
        ],
72
    ],
73
 
74
    'mod/zoom:refreshsessions' => [
75
        'riskbitmask' => RISK_XSS,
76
        'captype' => 'write',
77
        'contextlevel' => CONTEXT_COURSE,
78
        'archetypes' => [
79
            'manager' => CAP_ALLOW,
80
        ],
81
    ],
82
 
83
    'mod/zoom:eligiblealternativehost' => [
84
        'riskbitmask' => RISK_PERSONAL,
85
        'captype' => 'read',
86
        'contextlevel' => CONTEXT_COURSE,
87
        'archetypes' => [
88
            'teacher' => CAP_ALLOW,
89
            'editingteacher' => CAP_ALLOW,
90
        ],
91
    ],
92
 
93
    'mod/zoom:viewjoinurl' => [
94
        'riskbitmask' => RISK_PERSONAL,
95
        'captype' => 'read',
96
        'contextlevel' => CONTEXT_COURSE,
97
        'archetypes' => [
98
            'teacher' => CAP_ALLOW,
99
            'editingteacher' => CAP_ALLOW,
100
            'manager' => CAP_ALLOW,
101
        ],
102
    ],
103
 
104
    'mod/zoom:viewdialin' => [
105
        'riskbitmask' => RISK_PERSONAL,
106
        'captype' => 'read',
107
        'contextlevel' => CONTEXT_COURSE,
108
        'archetypes' => [
109
            'student' => CAP_ALLOW,
110
            'teacher' => CAP_ALLOW,
111
            'editingteacher' => CAP_ALLOW,
112
            'manager' => CAP_ALLOW,
113
        ],
114
    ],
115
];