Help with Recycle Bin

Re: Help with Recycle Bin

by Leon Stringer -
Number of replies: 6
Picture of Core developers Picture of Particularly helpful Moodlers

In the above log screenshot it looks like the task is running for approximately 5 minutes which suggests something like PHP's max_execution_time is 300 and being exceeded.

In your original post, the "Deletion in progress" activities are all H5P. There's a known mod_hvp issue with slow backups (the recycle bin works by taking a backup of the course being deleted).

So could the problem be that deleting courses that contain H5P activities triggers a backup which is exceeding max_execution_time and never completing?

There's a workaround for the slow H5P backups: add $CFG->mod_hvp_backup_libraries = '0' to config.php to exclude the H5P libraries from the backup, I don't know if that would adversely impact restoring the course from the recycle bin.

The raw binary output in core_course\task\course_delete_modules is concerning! Which version of mod_hvp is installed?

In reply to Leon Stringer

Re: Help with Recycle Bin

by Ken Task -
Picture of Particularly helpful Moodlers

One of the things observed about recyclebin ... or maybe I haven't found it ...

If I delete a module from a course, recyclebin link in course menu appears as it shoulld.

If I delete a course, where does one find the recyclebin link?

Query of DB mdl_files table I an see the backup.mbz's that are recyclebin backups.

Wonder if having a directory in moodledata/ for recyclebin might help in certain situations.

'SoS', Ken

In reply to Ken Task

Re: Help with Recycle Bin

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Are you asking where to see the deleted course in the recycle bin? It's in the ⚙ (Actions) menu for the course category of the deleted course.

Recycle Bin menu in Course Categories list.

The screenshot in the docs is a little out of date.

In reply to Leon Stringer

Re: Help with Recycle Bin

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks.  Missed that ... kinda hidden.

But in the case of category deletion and courses contained therein were not moved to another category.   Recyclebin link/button is where in that case?

'SoS', Ken


In reply to Ken Task

Re: Help with Recycle Bin

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

On deleting a category the option What to do lists "Move contents to another category" or "Delete all - cannot be undone". Either way the course doesn't go the the recycle bin so no link needed.

In reply to Leon Stringer

Re: Help with Recycle Bin

by Chris Torres -
Well, the part of the screenshot I posted shows only H5P, but it happens with anything I try to delete, even with tags. Here's another screenshot for reference:


I haven't actually deleted a course yet, only individual activities, if that makes any difference. I don't know if this is the mod_hvp version, but I couldn't find any other reference to it, so I hope this is the information you're inquiring about:


Should I still try adding $CFG->mod_hvp_backup_libraries = '0' to config.php to exclude the H5P libraries from the backup? I don't know if it's relevant with the new information I shared.
In reply to Chris Torres

Re: Help with Recycle Bin

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

I think it's worth trying $CFG->mod_hvp_backup_libraries = '0'. It may be that deletion of other activities are stuck behind an H5P one.