Finally solve the problem "teacher cannot delete his/her own course"

Finally solve the problem "teacher cannot delete his/her own course"

by Moodle Admin -
Number of replies: 0

Hi to all moodlers

I have a problem that one instructor should be able to delete her/his own course. But there is not a direct solution.

I have search and try lots of different solutions but  i think this one is the best for the problem. The steps are below.

1-)We create a category that will hold the courses which are going to be deleted. For example category named "PLEASE DELETE THIS COURSE"  or "TRASH" .

2-)Assign course creator role for this category to  all the instructor that has course creator role on other categories. this will give the ability to move their course category to the "TRASH" category.

3-)And create a php script and delete all the courses in the "TRASH" category. And cron this script that will run in the desired frequency .

You can find the php file that will do steps 2-3 in the github



Average of ratings: -