General plugins (Local): Old quiz and question attempts deletion

local_deleteoldquizattempts
Maintained by Picture of Vadim Dvorovenko Vadim Dvorovenko
Deletes old quiz and question attempts by scheduler task or by CLI command.
19 sites
54 downloads
5 fans

Installation

Copy the deleteoldquizattempts folder into your Moodle /local directory and visit your Admin Notification page to

complete the installation.

Usage

Navigate to plugin settings and specify maximum lifetime of quiz attempts. Older attempts will be automatically deleted with scheduler task.

You can also specify to delete unused hidden questions. Hidden questions are questions, that were logically deleted, but were not deleted physically, because they were referenced in some quiz attempts. After quiz attempts deletion, such questions are probably no longer required.

You can also delete quiz attempts and unused hidden questions with command line job.

Deleting quiz attempts with CLI

Dispay help.

sudo -u www-data /usr/bin/php local/deleteoldquizattempts/cli/delete_attempts.php --help

Delete attempts that are older than 90 days and shows progress.

sudo -u www-data /usr/bin/php local/deleteoldquizattempts/cli/delete_attempts.php --days=90 --verbose

Delete attempts that are created before specified timestamp.

sudo -u www-data /usr/bin/php local/deleteoldquizattempts/cli/delete_attempts.php --timestamp=1514764800 --timelimit=300

Delete attempts that are created before 2018-01-01 00:00:00 (UTC).

sudo -u www-data /usr/bin/php local/deleteoldquizattempts/cli/delete_attempts.php --date="2018-01-01 00:00:00"

Deleting unused hidden questions with CLI

Dispay help.

sudo -u www-data /usr/bin/php local/deleteoldquizattempts/cli/delete_unused_questions.php --help

Delete unused hidden questions.

sudo -u www-data /usr/bin/php local/deleteoldquizattempts/cli/delete_unused_questions.php --timelimit=300 --verbose

Screenshots

Screenshot #0

Contributors

Picture of Vadim Dvorovenko
Vadim Dvorovenko (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
Please login to post comments