~ubuntu-branches/ubuntu/saucy/moodle/saucy

« back to all changes in this revision

Viewing changes to mod/lti/db/access.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2013-09-09 15:22:35 UTC
  • mfrom: (1.1.17) (3.1.29 sid)
  • Revision ID: package-import@ubuntu.com-20130909152235-f5g7gphaseb84qeu
Tags: 2.5.2-1
* New upstream version: 2.5.2.
  - Incorporates S3 security patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
$capabilities = array(
33
33
 
 
34
    // Whether the user can see the link to the external tool and follow it.
34
35
    'mod/lti:view' => array(
35
36
        'captype' => 'read',
36
37
        'contextlevel' => CONTEXT_MODULE,
37
38
        'archetypes' => array(
38
 
            'guest' => CAP_ALLOW,
39
39
            'student' => CAP_ALLOW,
40
40
            'teacher' => CAP_ALLOW,
41
41
            'editingteacher' => CAP_ALLOW,
43
43
        )
44
44
    ),
45
45
 
 
46
    // Add an External tool activity to a course.
46
47
    'mod/lti:addinstance' => array(
47
48
        'riskbitmask' => RISK_XSS,
48
49
 
55
56
        'clonepermissionsfrom' => 'moodle/course:manageactivities'
56
57
    ),
57
58
 
 
59
    // Controls access to the grade.php script, which shows all the submissions
 
60
    // made to the external tool that have been reported back to Moodle.
58
61
    'mod/lti:grade' => array(
59
 
        'riskbitmask' => RISK_XSS,
 
62
        'riskbitmask' => RISK_PERSONAL,
60
63
 
61
64
        'captype' => 'write',
62
65
        'contextlevel' => CONTEXT_MODULE,
67
70
        )
68
71
    ),
69
72
 
 
73
    // When the user arrives at the external tool, if they have this capability
 
74
    // in Moodle, then they given the Instructor role in the remote system,
 
75
    // otherwise they are given Learner. See the lti_get_ims_role function.
70
76
    'mod/lti:manage' => array(
71
 
        'riskbitmask' => RISK_XSS,
 
77
        'riskbitmask' => RISK_PERSONAL, // A bit of a guess, but seems likely.
72
78
 
73
79
        'captype' => 'write',
74
80
        'contextlevel' => CONTEXT_MODULE,
79
85
        )
80
86
    ),
81
87
 
 
88
    // The ability to create or edit tool configurations for particular courses.
82
89
    'mod/lti:addcoursetool' => array(
83
90
        'captype' => 'write',
84
91
        'contextlevel' => CONTEXT_COURSE,
85
92
        'archetypes' => array(
86
 
            'teacher' => CAP_ALLOW,
87
93
            'editingteacher' => CAP_ALLOW,
88
94
            'manager' => CAP_ALLOW
89
95
        )
90
96
    ),
91
97
 
 
98
    // The ability to request the adminstirator to configure a particular
 
99
    // External tool globally.
92
100
    'mod/lti:requesttooladd' => array(
93
101
        'captype' => 'write',
94
102
        'contextlevel' => CONTEXT_COURSE,
95
103
        'archetypes' => array(
96
 
            'teacher' => CAP_ALLOW,
97
104
            'editingteacher' => CAP_ALLOW,
98
105
            'manager' => CAP_ALLOW
99
106
        )