Recycle Bin -- deleting large complex objects and waiting

Recycle Bin -- deleting large complex objects and waiting

by Brian Warling -
Number of replies: 4

We have been testing the Recycle Bin plugin on our Moodle 2.7 site. This is something that is really needed, and I'm happy that Moodle has added it to core in Moodle 3.1. During our tests, we came across an issue that may preclude us from installing it (or enabling it when we move to Moodle 3.1). When you delete small items; e.g., labels, simple pages, the deletion occurs quickly. And by "deletion," I mean this workflow:

  1. Turn editing on
  2. Delete item
  3. Turn editing off

But when you delete a larger, complex object, step 3 above -- turning editing off -- can take a long time, and there is no indication (other than what the browser provides) that something is happening. You basically have to wait for it to finish. Something that used to happen immediately -- turning editing off after deleting something (regardless of its complexity) -- can take minutes with the Recycle Bin enabled. An example of a "large, complex object" is a quiz with 95 questions and 155 student responses. Obviously, Moodle is working on backing up the quiz, and since it's rather complex (lots of responses), it takes time. What seems to be missing is some kind of indicator (e.g., progress bar) to let users know that something is happening. The same thing happens on restore. Restoring this kind of quiz can take some time, but there isn't any kind of progress indicator to let the user know that something is happening.

I'm seeing the same thing on a new Moodle 3.1 server. Deleting a quiz like this takes time (i.e, turning editing off after deleting it takes a couple minutes for the system to come back). There isn't any progress indicator. Same on restore. I realize this might be an outlier... most deleted items will be be much smaller, and the time for the deletion to complete will be very short. But users delete all kinds of things.... big items, small items. I think the system should at least provide users with some indication that something is happening.

Does this make sense? Are my concerns reasonable?

Thanks much.... Brian

Average of ratings: -
In reply to Brian Warling

Re: Recycle Bin -- deleting large complex objects and waiting

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Brian,

Thanks for the feedback.

You are right. Leaving the user in this state wondering why things are taking forever is not ideal.

I imagine this could potentially be quite difficult to implement as we are not on a page that the recycle bin has full control over. We have two hooks in core that the recycle bin uses - when we delete a course and when we delete an activity. When these hooks are called the recycle bin does its thing but there is currently no way for it to go - "Hey guys, this is taking some time, can you notify the user on that page please?".

This requires some more thought.

In the meantime are you able to create an issue on tracker.moodle.org where we can discuss this? It also allows people from the community to vote on it so we at HQ can see that it is an issue affecting many others - boosting its priority.

Cheers!
In reply to Mark Nelson

Re: Recycle Bin -- deleting large complex objects and waiting

by Brian Warling -

Hi Mark -- 

Thanks for the response. I've gone ahead and created the tracker issue for this:

https://tracker.moodle.org/browse/MDL-54751

Brian

In reply to Brian Warling

Re: Recycle Bin -- deleting large complex objects and waiting

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi,

Thanks Brian for this discussion and tracker issue.

Séverin

In reply to Séverin Terrier

Re: Recycle Bin -- deleting large complex objects and waiting [Solved]

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Just noting for anyone who comes across this thread, that MDL-54751 is fixed in Moodle 3.2, where activities are deleted asynchronously and a message 'Activity deletion in progress...' is displayed.

Please note that this requires the cron to be run every minute.