Syxton / moodle-block_massaction

THE OFFICIAL Mass Actions block for Moodle 3.9 and beyond
9 stars 14 forks source link

Q: Is it possible for Moodle Admins to find any course to send duplicate to? #61

Closed cdipe closed 2 years ago

cdipe commented 2 years ago

This is a great tool for managing courses! Question: Is there a permission to set for Moodle administrators so they can duplicate course resources to courses they are not added to? Our Learning Technicians would like to use this, but they are only added at category context, not course context.

Syxton commented 2 years ago

@cdipe I haven't tested it, but I believe if you look in classes/form/course_select_form.php look for the following code: 'limittoenrolled' => true

Setting this to false would allow non enrolled courses, but still require a permission which SHOULD work for you.

Syxton commented 2 years ago

@PhMemmel This should probably be a setting. "Duplicate to course limited by enrollment" What do you think?

cdipe commented 2 years ago

@Syxton if it could be a permission to be set for different roles it would be great!

Syxton commented 2 years ago

@cdipe I should have been more clear. If you set the limittoenrolled to false, it still will require the person have the permission of moodle/restore:restoretargetimport in the target course. This permission can be altered for your site, but generally is allowed for Teacher and Admins/Managers of site and category levels.

PhMemmel commented 2 years ago

The implementation decision was to limit the courses to the ones which the user is enrolled in, because on very big moodle instances with a lot of courses this will result in big performance issues (loading times of 30s and more, request timeouts), so it was safer to use limittoenrolled=true there. But we can make this configurable, no big deal, yes.

cdipe commented 2 years ago

@Syxton @PhMemmel thank you!

cdipe commented 2 years ago

Wonderful!