danmarsden / moodle-mod_dialogue

Dialogue Module for Moodle
27 stars 35 forks source link

Request - Re-enable the functionality to assign permissions to the activity. #103

Closed licethrey91 closed 2 years ago

licethrey91 commented 2 years ago

Version 3.4 of the mod_dialogue plugin allowed to create activities and assign roles to the permission (mod/dialogue:receive) at the activity level. But now the activities are not currently taking these permissions. This functionality was in this version.

if (!has_capability('moodle/site:accessallgroups', $context)) {

https://github.com/danmarsden/moodle-mod_dialogue/blob/c7272bc2b4d71cc6276f81df3715767137202964/locallib.php#L67

Screen Shot 2022-01-17 at 2 34 41 PM

Now when the role is assigned at activity level all the enrolled users are shown, the permission is taken at course level.

We found the following documentation about the plugin code for posterior versions. 095ca9c

It would be important if the plugin can be reconfigured to allow assigning roles at activity level again.

Screen Shot 2022-01-17 at 2 32 30 PM

Thanks if you can help me with this.

danmarsden commented 2 years ago

I don't have a lot of capacity right now, but if you submitted a pull request I'd be happy to review it - I'd be tempted to modify the custom web service call to take a coursemoduleid instead of a courseid rather than just adding a cmid to the exisitng list of parameters.