How to find all URL course resources by name

How to find all URL course resources by name

by Ben Laor -
Number of replies: 3

Hi, i'm looking to remove all course URL resources that contain a certain string in their name.

My question is: is there a way to do that for the entire site by an sql query of some sort? if so what is it? is the file name not something that appears in the database? because i couldn't find it in the course_modules table.

Average of ratings: -
In reply to Ben Laor

Re: How to find all URL course resources by name

by Bruce Herbert -

Have a look at this:

https://docs.moodle.org/33/en/Search_and_replace_tool

Never used it myself, but it might do what you are after.

In reply to Bruce Herbert

Re: How to find all URL course resources by name

by Ben Laor -

Hey, This doesn't really help in my case, since i am looking for a way to remove those links (they are a type of resource in the courses, which i can remove individually, but that would take forever since they are in every course on my site).

In reply to Ben Laor

Re: How to find all URL course resources by name

by Ben Laor -

I've found the solution.

These resources reside in "mdl_url" table, I just deleted all instances of that url from the table and cleared all caches in my site and they got removed from all the courses.

Average of ratings: Useful (1)