General help

 
 
Picture of Andrea Hall
Deleting Courses
 
Not sure where to put this question. We have lots of 'practise' courses and want to delete them (like over 150) How can our administrator delete several at one time instead doing it one by one and taking for ever?mixed
 
Average of ratings: -
Picture of Ger Tielemans
Re: Deleting Courses
 
A related question: if a backup/restore operation fails, deleting the course sometimes breaks before the end: how to find/kill the corrupt course fragments in the database?
 
Average of ratings: -
Picture of Ger Tielemans
Re: Deleting Courses
 
What I mean is this: can I just do a database operation like: "for all tables kill the records with courseid=X" and trust that all course X related records are killed? (And - as final step - I only have to remove the resources in the datadir?)
 
Average of ratings: -
Picture of Andrea Hall
Re: Deleting Courses
 
Still hoping for help in deleting many courses at once! (like 100 old workshops)
Thanks
 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Deleting Courses
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers
What sort of access do you have to the server in question? If you can uploade new PHP files, then make one that incudles moodlelib and then calls the delete_course function for each courseid you want to get rid of.

Just make sure you don't screw up without taking a backup first.
 
Average of ratings: -
Picture of Andrea Hall
Re: Deleting Courses
 
Sorry, we don't have PHP experts on campus, so any more details on this suggestion?
 
Average of ratings: -
Picture of Helen Foster
Re: Deleting Courses
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
Hi Andrea,

Perhaps you could speed up the process of deleting courses one by one by opening the delete confirmation pages in new tabs. It's rather tedious deleting a large number of courses but it need not take forever. wink
 
Average of ratings: -
Picture of Keith Richardson
Re: Deleting Courses
 
Actually, I am having trouble simply deleting a course. I have admin status, so it should be easy, but maybe I am ...blind??...
help!!! How do I do that!
Keith
 
Average of ratings: -
Picture of Daniele Cordella
Re: Deleting Courses
Group Developers
Ciao Keith
go to course categories and "Turn editing on"!!!!!
 
Average of ratings: -
Picture of Amarbir Singh
Re: Deleting Courses
 
how do you turn editing on?
 
Average of ratings: -
Picture of James Tasto
Re: Deleting Courses
 
Did you ever solve this problem? We are using version 1.7+ and cannot delete courses.
 
Average of ratings: -
Picture of Cristi Magherusan
Re: Deleting Courses
 
Maybe it's too late, but maybe anyone is having the same problem.
In 1.9 you can do it if you edit the parent category and click the X button in your course's entry.
 
Average of ratings: -
Picture of Rosalyn Metz
Re: Deleting Courses
 
I stumbled upon this forum when I was looking for the same thing. For anyone else that stumbles upon this forum. There is a great block developed out of LSU called backadel. This allows you to back up and delete courses in bulk.

CONTRIB-605

Also make sure that you vote for this in the Moodle Tracker. It would be a shame to NOT have this added to Moodle.
 
Average of ratings: -
Picture of Eric Strom
Re: Deleting Courses
 

I find this still cumbersome in moodle 2.3.

A trick I use is:

  1. Create a new category named something obvious like "To Be Deleted".
  2. Move your courses you want deleted to this new category.
  3. Delete the entire category along with the courses within.

Get's them all in one shot.

- Eric

 
Average of ratings: -