|
Loïc, thanks for your report and patch.
Sorry I'm unable to review your patch, however I suggest you post in the roles and capabilities forum http://moodle.org/mod/forum/view.php?id=6826 Ok thank you, I'll ask on the forum then. It has already been asked but we got no answers so we made this patch to moodle.
I don't expect anything from the forum as I received no reply to the first thread. Our problem is that we have this fix and it seems to work as expected. But we can't keep every fix for every features we fix. I haven't tested Loïc's patch yet, but we discovered this same "bug" today. I would love to see the ability to manually add any user to a metacourse.
It makes no sense to me to use the "manage metacourse" capability as a criterion for adding a user to a metacourse. Only Administrators and users who are already enrolled as Teachers within the context of this metacourse have this capability enabled by default. To make metacourses truly useful, teachers need to be able to add users manually to the metacourse. There are scenarios in which a user might need to be added to the metacourse but should not be able to see any of the child courses. The "manage metacourse" capability should ONLY control a user's ability to add and remove child courses. Either there should be a separate capability to control who can manually add users to a metacourse, or it should rely on the same logic as a regular course. (E.g. if a Teacher can add students to a regular course, s/he should also be able to add students directly to a metacourse.) Loïc, could you explain exactly what your patch does? We ran into problems trying to fix this within Moodle. We could allow people to be manually enrolled in the course, but when the course enrollments were synchronized with the child courses (e.g. when we tried to unenroll one of the manually-added users), ALL manually-added users (who did not have "manage metacourse" capability) were unenrolled. Have you found a way to make manual enrollments stick? This takes managemetacourse off the table for user/course management but that's just half the problem. I don't see the course:request capability in my testing instance, and you'd need to add it to all the managers who already have managemetacourse plus all the students who get manually added, and I don't see any code doing that.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Can someone tell me if the patch I provided is Okay. If there is something wrong. Tell me, I'll do the necessary change.
Is there a reason why only the people with the managemetacourse capability can join a metacourse. While other users with normal roles can't.
Is there a way to achieve the scenario2 without giving the managemetacourse capability.
Unless the above is impossible without giving the manage metacourse capability. I'd like to know if there is any risk with the patch I made.
Thank you,
Loïc Faure-Lacroix