donhinkelman / moodle-block_sharing_cart

Content sharing plug-in for Moodle LMS. Now at version 4.4, release 3 (actually this is for Moodle LMS version 4.3. Requires PHP 7.4.
7 stars 38 forks source link

Backup capability with sharing cart #3

Closed behoof closed 4 years ago

behoof commented 5 years ago

I want to give teachers the right to use the sharing cart, but not permitting backup. Now they need to have the backup capability in order to use the sharing car, which gives us the unneccessary and hindering storage and server load. How to give the permission to use sharing cart and not backup?

Bert

donhinkelman commented 5 years ago

Hi Bert, sorry I don't quite understand the problem. Are you saying that you want to have option to give/deny teachers the right to backup/restore the whole course? Why does having that right cause storage and server load?

krajewsk commented 5 years ago

I think Bert is saying to use the sharing cart a user has to have a role with course backup capability. Bert is currently preventing instructors from backing up courses because if they could backup courses they could create some large files on the server (course backups) and performing a backup could put load on the server.

behoof commented 5 years ago

That's correct. Editing Teachers are using the Sharing Cart, but by doing so they have also the course backup and (possibly) the restore option. Thus creating a performance risk and also an IPR issue when they editing a course which isn't their property. So the need is to give them sharing cart capabilities, but not backup/restore capability.

donhinkelman commented 5 years ago

What is the difference between: a) sharing cart capabilities and b) backup/restore capability? I will need some help here to understand the problem.

abias commented 5 years ago

In https://github.com/donhinkelman/moodle-block_sharing_cart/blob/022c6b174a36a0606ac53bd2bfa5fa75755aaa8a/classes/controller.php#L126-L128, block_sharing_cart is requiring three capabilities from Moodle core which are there to allow backup and restore in courses. Without these capabilities, a user is not able to use Sharing cart.

However, I doubt that this can be changed easily. Sharing cart is simply using the existing backup and restore mechanisms under the hood, providing a per-activity and per-course-section interface to users.

donhinkelman commented 5 years ago

Thank you, Alex, for explaining the issue for me. Yes, this is the fundamental design of the Sharing Cart is that it borrows the backup/restore code of core Moodle and gives a simplified interface with fewer clicks to move an activity or resource. So I am afraid these permissions depend on core. The workaround, Bert, is that you will have to train the teachers to use their backup rights responsibly. If there is sensitive data that could be lost, then I am afraid you will have to use the Sharing Cart upon their request.