General help

Moodle 3.1+ Cannot delete resource

 
Picture of Ken Russell
Moodle 3.1+ Cannot delete resource
 

A teacher reported to me that she is unable to delete a simple resource in her course (a PDF). When she tries to delete the file she first gets the standard "Do you really want to delete the file..." but when she clicks Yes, an error pops up that says "Unknown Error." As the admin, I also get the same response when trying to delete the file. Actually, the file at first disappears from the page but when the page is refreshed it is still there.

We recently upgraded to Moodle 3.1+, I'm wondering if this is a bug in this recent version of Moodle.

Any advice you can give me regarding this problem would be greatly appreciated!

Ken
Bellingham School District, WA


 
Average of ratings: -
Ben talking on the phone beside a monitor
Re: Moodle 3.1+ Cannot delete resource
Particularly helpful MoodlersTesters

Commenting to follow.

What process is the teacher following to delete? Could you spell it out step by step?

 
Average of ratings: -
Picture of Ken Russell
Re: Moodle 3.1+ Cannot delete resource
 

She is using the resource item's drop-down menu and choosing "Delete". I used this same method and got the same result. I dont' know of any other way to delete an item.


 
Average of ratings: -
Ben talking on the phone beside a monitor
Re: Moodle 3.1+ Cannot delete resource
Particularly helpful MoodlersTesters

A couple of ideas.

  1. She seems to be deleting from the calendar. that's not where the resource lives. Try going to the classroom and deleting the resource there.
  2. If the resource is used anywhere else, it can't be deleted. So, check other courses, etc.
 
Average of ratings: -
Picture of Ken Russell
Re: Moodle 3.1+ Cannot delete resource
 

Ben,

Thanks very much for the suggestions. I know it is not #1, I was unable to delete it (as administrator) and I was not doing that from the calendar but rather from the topic list.

#2 might be a possibility. I took a look at the settings for the file but it does not say that it is being used in any other course. How would I tell if the file was being used in another course? Is there a way to tell?

Thanks again for your help with this!

Ken Russell
Bellingham School District, WA

 
Average of ratings: -
Picture of Helen Foster
Re: Moodle 3.1+ Cannot delete resource
Core developersDocumentation writersMoodle HQParticularly helpful MoodlersPlugin developersTestersTranslators

Hi Ken,

Another thing you could try is turn on Debugging then try again to delete the resource.

 
Average of ratings: -
Ben talking on the phone beside a monitor
Re: Moodle 3.1+ Cannot delete resource
Particularly helpful MoodlersTesters

And also, having looked at your other forum post, if the file name has spaces or funny characters, you'll need to rename the file before you can delete it. CamelCaseIsAGoodWayToNameFiles.pptx

 
Average of ratings: -
Ben talking on the phone beside a monitor
Re: Moodle 3.1+ Cannot delete resource
Particularly helpful MoodlersTesters

Sorry,  I didn't read carefully. She's using the resource's dropdown and clicking delete.

So, I would check to see if it is used anywhere else first.

For security reasons, Moodle's file system is complicated. A resource's link points to a URL that is not the actual location of the file. You'll see "draft" somewhere in the URL. Try comparing the URL before and after deleting. Is it the same?

 
Average of ratings: -
Picture of ahmed galal
Re: Moodle 3.1+ Cannot delete resource
 

hi

I've got a problem when delete the Quiz, I was working a database sql server.

When you clear the exam shows this message Unkown error.


 
Average of ratings: -
Picture of Takeshi Matsuzaki
Re: Moodle 3.1+ Cannot delete resource
 

Sorry long long distance answer smile 

But if you have the same problem, can you try this one ?

mysql>set innodb_strict_mode=OFF;

 
Average of ratings: -
Picture of Kim Solis
Re: Moodle 3.1+ Cannot delete resource
 

I am having the same problem.  I am the administrator and I cannot delete any resource or activities from any of our courses.  I get the "unknown error" message, the resource appears to be deleted and then when the page is refreshed the resource appears again.  I have been hiding the things I don't want anymore, but it is making for a cluttered course.  This has only begun happening recently. We have Moodle 3.1 and have not made any changes.  Will upgrading to Moodle 3.3 help???

 
Average of ratings: -
Picture of AL Rachels
Re: Moodle 3.1+ Cannot delete resource
Core developersParticularly helpful MoodlersPlugin developersTesters

Hi Kim,

I have had the same experience when I had permissions set wrong. I normally do upgrades logged in as root on my Linux Centos 7 server via WinSCP from my Windows 10 desktop. If I change any files I have to remember to reset permissions to any changed Moodle files from root, back to the web server, apache.

 
Average of ratings: -