Activity module visible to manager but not to teachers or students

Activity module visible to manager but not to teachers or students

by Leo Auri -
Number of replies: 1

Hi, I'm writing an activity module.

As a manager, I can add the activity to a course, and as a manager I can see it in the course.

As a teacher or student of the course, it is not visible in the course. 

I have defined a view capability in access.php:

    'mod/room:view' => [
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'archetypes' => [
            'editingteacher' => CAP_ALLOW,
            'manager' => CAP_ALLOW,
            'student' => CAP_ALLOW,
            'authenticateduser' => CAP_ALLOW
        ],
        'clonepermissionsfrom' => 'moodle/course:view',
    ],

I haven't found anything so far that I'm not doing. Any ideas?

Average of ratings: -
In reply to Leo Auri

Re: Activity module visible to manager but not to teachers or students

by Leo Auri -
I removed the line
        
'clonepermissionsfrom' => 'moodle/course:view'

My guess is that that was a problem because it tries to clone non-existent module-level permissions from capabilities with course-level context.