Contextual Role/Capabilities question

Re: Contextual Role/Capabilities question

by Davo Smith -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Hmm... I think the simple answer is "No" - Moodle allows you to control which activity types a user can add to a course (to prevent certain activity types from appearing in particular courses / course categories), but does not allow you to control which activity types a user can edit (they can either edit all activities on a course, or none).

It's hard to imagine how such a restriction could work - e.g. let's assume you could only edit "forum" activities. Would that include being able to "move" such an activity to a new location (including displaying other activity types, by moving your activity above them)? Would being able to show/hide the activity type be included? What about users who had the ability to create a particular activity type, but not edit it - they could create a "forum" by accident, but wouldn't then be able to delete it? Or are you wanting users to be restricted to only editing activities that they created themselves (which would require the tracking of the user who created it).

I understand what you're trying to do, but you'd need to come up with a very detailed proposal about exactly how this would work in practice (without introducing hundreds of new capabilities, for such a small edge-case).