General plugins (Local): Course recompletion

Maintained by Picture of Dan MarsdenDan Marsden, Picture of Catalyst ITCatalyst IT
This plugin adds course level settings for recompletion - clearing all course and activity completion for a user based on the duration set notifying the student they need to return to the course and recomplete it.
339 sites
38 fans
Current versions available: 3

This plugin adds course level settings for recompletion - clearing all course and activity completion for a user based on the duration set notifying the student they need to return to the course and recomplete it.

This plugin could be used to facilitate annual re-certification.

This plugin deletes existing course completion and activity completion data based on the schedule set by the teacher including the ability to delete Quiz and SCORM attempts within the course. You can also choose to retain the quiz and SCORM attempts within archive tables within the recompletion plugin (You will have to write your own reports to view this archived data though - no reports are currently included in this plugin.)

The following information is cleared from the course during recompletion:

  • All activity grades cleared (and saved to standard grade history tables.)
  • All activity completion and course completion flags removed. (with the option to archive this information)

The following activities have extra support:

  1. Quiz - You can choose to delete all existing quiz attempt data with the option to archive the information or, you can keep the existing attempts and give the student the ability to add new attempts.

  2. SCORM - You can choose to delete all existing SCORM attempt data with the option to archive the information.

  3. Assignment - You can choose to give the student another attempt (if the assignment is configured to allow reopening and the maximum number of attempts has not been reached.

Other activities that store user data will have the activity completion data reset, but may require manual intervention as they are not yet supported fully. Get in touch privately if you would like to fund support for other activities with user data.

For more information on the current issues with this plugin please see the issues tracker:


Screenshot #0


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

Comments RSS

Show comments
  • Picture of Dan Marsden
    Thu, Jul 11, 2019, 8:10 AM
    a user can reset their own completion, but there is no UI for an admin/teacher to select a specific user to reset - if you login-as the user, and hit the cog icon within the course you should see a link to reset the users completion (unless you have modified capabilities to prevent this.) - I would like to add this functionality at some point though! - pull requests are always welcome!
  • Picture of Shirley Gregorczyk
    Wed, Jul 24, 2019, 10:54 PM
    Hello Dan,
    I just noticed the user can reset their own completion functionality. Very handy. But I ran into another issue, I end dated a course as it was a retired test course. When I attempted to delete the course, it sent me a Recertification Notification. As an administration, should we be disabling the course recompletion for the course(s) before we delete a course?
    Kind Regards, Shirley
  • Picture of Dan Marsden
    Thu, Jul 25, 2019, 6:02 AM
    Sounds like a bug! - there should be way to prevent that from happening, feel free to report a bug in the tracker linked above - thanks!
  • Picture of Dave P
    Thu, Aug 22, 2019, 11:01 AM
    Hi Dan - This is a great plugin. I have a question regarding enrollment and the plugin.
    Does the plugin universally delete all users completion data after a set period or is the data deleted based on a users start date.
    For instance a user registers and starts a course on 5/1/20 and the plugin was set for 6 months on 1/1/20. Will this user have 6 months to complete the course or will the data be deleted on 6/1/20?
  • Picture of Dan Marsden
    Thu, Aug 22, 2019, 11:45 AM
    @Dave It doesn't do anything related to enrollment dates. The timer starts based on the specific users course completion date. Provably best you install it and see how it works.
  • Picture of Almants Ra
    Wed, Sep 4, 2019, 11:18 PM
    Hi Dan,
    Thanks for great plugin. But I have a question.
    What is the trigger for the plugin to delete attempts?
    Asking, because I unlocked Course completion to add additional items left out before and cron recalculated course completion with new items, putting today's date as a completion date.
    I'm worried that plugin is looking on this date now. sad
  • Picture of Jake Garrison
    Thu, Sep 12, 2019, 2:27 AM
    HI Dan!
    Was curious if you could point me in a direction to solve a problem. It seems your plugin does not reset attempts for H5P based activities. Was hoping I could modify it myself. I'm pretty handy with PHP but Moodle is a bit of a beast. Any pointers?
  • Picture of Karolien Burms
    Fri, Sep 20, 2019, 11:31 PM
    Hi Dan,
    Maybe you could help me with something. The CRON task "Check for users that need to recomplete" does not run for me but adds a fail delay every time. Do you have an idea what could have gone wrong? We have moodle 3.6
    In the log file for CROn we see this:
    Execute scheduled task: Check for users that need to recomplete (local_recompletion\task\check_recompletion)
    ... started 15:50:01. Current memory use 19.4MB.
    ... used 1 dbqueries
    ... used 0.050018072128296 seconds
    Scheduled task failed: Check for users that need to recomplete (local_recompletion\task\check_recompletion),Error reading from database

  • Picture of Dan Marsden
    Mon, Sep 23, 2019, 9:20 AM
    @Karolien - try the latst code from github, there was a bug related to the cron tasks that was fixed semi-recently.
  • Picture of MAG II
    Tue, Sep 24, 2019, 11:07 PM
    Hello -
    I have been using your plugin for some time, and have had a course recomplete after 365 days. Meanwhile, I have been tracking how long it takes a user from time of enrollment in a course to how long it takes that person to complete the course. I have been doing this via SQL with information in the database tables (Moodle Adminer plugin).

    Now that my course has recompleted I am having trouble finding the actual date that the course reset for a user. Is this date of when course recompletes (resets) available in the database somewhere?
  • Picture of Dan Marsden
    Wed, Sep 25, 2019, 7:55 AM
    @Mag - you might need to look at the log table for the completion_reset event for that user. don't think there's any other fields you could use to do this sorry.
  • Picture of MAG II
    Sat, Sep 28, 2019, 12:54 AM
    Hey Dan - Thanks for the response. That sounds like it would put me on the right track, but where do I find the completion_reset event in the database? I opened up all of the log tables and did not find such an event.
  • Picture of Dan Marsden
    Mon, Sep 30, 2019, 4:54 AM
    take a look in the logstore_standard_log table or the site logs report and you should see a recompletion log entry at the time of recompletion.
  • Picture of David Collins
    Fri, Dec 27, 2019, 12:38 AM
    I would like the plug-in to not reset completion automatically, and only at the user's request. I assumed setting the recompletion period to 0 would do this, but I am seeing instances of the user completion reset by the CLI in the log table you mention above. Is that the expected behavior?
  • Picture of Dan Marsden
    Mon, Jan 27, 2020, 5:58 AM
    @David Collins - you would be better to set it to some large figure in the future (try something like 50 years)
1 2 3 4 5
Please login to post comments