how to clean up the previous data from moodle

how to clean up the previous data from moodle

by Abu Ali -
Number of replies: 5

dear moodler,

i am using moodle 3.5 and I used to run cron file automatically in the control panel. i set the log record of 120 days from the current day to previous. log data is working fine but i noticed that my forum messages, result of quizzes are not deleted. my moodle is containing the record of all forum messages and quizzes from the last year also. please help me how can i delete the forum and quizzed data from the moodle to get the optimized performance of the site.


Average of ratings: -
In reply to Abu Ali

Re: how to clean up the previous data from moodle

by William Stewart -

Have you reset the courses that contain the forums, quizzes, etc? 

In reply to William Stewart

Re: how to clean up the previous data from moodle

by Abu Ali -
Thanks dear William,

I have around 400 modules and as an administrator it is very difficult to reset all the courses or modules one by one. Do you have another method to clean up the quizzes or forums. Thanks

In reply to Abu Ali

Re: how to clean up the previous data from moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Got a Linux server and command line access to server?   Can you install software?

If so, please see:

http://moosh-online.com/commands/

Look for the command for course-reset.   Could create a looping bash shell script that loops through course ID's and executes the moosh course-reset command with the parameters desired.

'spirit of sharing', Ken


Average of ratings:Useful (1)
In reply to Ken Task

Re: how to clean up the previous data from moodle

by Abu Ali -

Thanks Ken,

I would like to say thanks to Mr. ken , for providing me the help to solve the problem. i will try accordingly as you said and will come back in case of any trouble. 

thanks once again