Delete all quiz attempts by cron job

Delete all quiz attempts by cron job

by Bente Olsen -
Number of replies: 3
Picture of Testers Picture of Translators

Is it possible to setup a cron job that deletes all quiz attempts in a course? I have access to cpanel, files and phpMyAdmin on the server. (Moodle 1.9)

Average of ratings: -
In reply to Bente Olsen

Re: Delete all quiz attempts by cron job

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You will have to write some PHP code yourself to do this, but it is not too hard. There is a quiz_delete_all_attempts function in mod/quiz/lib.php.

In reply to Tim Hunt

Ang: Re: Delete all quiz attempts by cron job

by Bente Olsen -
Picture of Testers Picture of Translators

Thanks for your answer, it sounds promising though I am not skilled to do that myself.

In reply to Bente Olsen

Re: Ang: Re: Delete all quiz attempts by cron job

by Benjamin Lesjak -

Hi Bente.

Did you solve this question? I know it was a while ago.

Thanks,

Ben