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

Improvement: Add the possibility to exclude specific activities / resources for the usage with sharing cart #19

Closed Kathrin84 closed 5 years ago

Kathrin84 commented 5 years ago

Hi Don,

this is not an urgent issue, we just thought about this option and wanted to propose this to you. I'll explain the background for it:

While testing your plugin for Moodle 3.6, we've encountered that the duration for the backup / restore process for different activities / resources is different, too. While many items are backed up within few seconds, others need more than 10 seconds per item. One activity takes more than 10 minutes!! Of course, this is a problem of the affected activity / resource and should be fixed there, but in the meantime it makes the sharing cart unusable (as long as the process is not changed to a background process for example) if this item is included to be copied to the sharing cart. In that case it would be great if the admin could define that this affected activity / resource could be excluded from the sharing cart. I could imagine that there are some more use cases where this feature could be of advantage if the admin could decide that specific items will be excluded. Of course it's not a everyday use case but very helpful, if needed. We just wanted to record it. :)

What do you think about this?

Best, Kathrin

donhinkelman commented 5 years ago

Hi Kathrin, I have encountered this problem as well, and I wonder how you can identify which activity/resource causes the problem. If this item causing a 10 minute backup wait is easy to identify, then it should be possible to exclude it from the backup. As you say, this is a non-urgent but important issue to solve.

Kathrin84 commented 5 years ago

Hi Don,

and I wonder how you can identify which activity/resource causes the problem.

I'm not quite sure if your question is meant in a technical way for you to solve the problem within your plugin? For example to check if a process takes more than X second and then skip it? Or if you would like to know how I detected what activity took so long?

I'm thinking out loud now about the first aspect. I understand that it would be "nice" for your plugin, if it runs smoothly. On the one hand you would need to feedback the behavior to the user, e.g. "Activity X did not finish within xy seconds and therefore was not added to the sharing cart". But on the other hand, with that check you could also exclude maybe quizzes with many questions or other plugins that take some time to backup. I don't think that's a really desirable way. Furthermore you try to fix a problem that's caused by the activity itself and should be fixed there.

So I would stick to the proposal that the admin should be able to disable specific activities from adding to the sharing cart. Ideally, the issue should be reported to the plugin maintainer of the plugin that causes the problem. If this will be fixed, the activity could then be enabled again.

Furthermore, my example was only one use case that triggert my proposal. As I already wrote, there may be more use cases where it is beneficial for an admin to be bale to disable specific items from being added to the sharing cart.

Hopefully, I could help you with my thoughts. If you meant the second question, I'll be happy to answer that, too, of course. :)

Best, Kathrin

donhinkelman commented 5 years ago

I think the reason for slowness is almost always the Question Bank. This is a known issue within Moodle core. The Question Bank cannot minimize what it copies, so it usually copies the whole Question Bank of the whole site. In our case it could be about 30,000 questions with media. I don't know but maybe the only way around this is to warn users to use standard backup/restore when they have a large question bank, and check the box "exclude question bank". However, I am sure they want the question bank, so that does not help. If you have some more suggestions, I will think about them.