Meta Cleaner

Local plugins ::: local_metacleaner
Maintained by Sadik Mert
MetaCleaner is a Moodle plugin that manages and cleans up Meta Link enrollments for courses with expired end dates, allowing administrators to disable, delete, or automatically reactivate them if the main course's end date is removed or extended.
Latest release:
12 downloads
2 fans
Current versions available: 1

MetaCleaner is a powerful Moodle plugin designed to help administrators efficiently manage and clean up Meta Link enrollments for courses with expired end dates. By automating the handling of Meta Link enrollments, MetaCleaner ensures that your Moodle environment remains organized and free of outdated or inactive enrollments.

This plugin provides administrators with flexible options to disable, delete, or reactivate Meta Link enrollments based on the status of the main course's end date. It integrates seamlessly into Moodle's administrative interface and leverages scheduled tasks to automate the cleanup process.


Key Features

  1. Disable Meta Link Enrollments:

    • Automatically disables Meta Link enrollments for courses whose end date has passed, without deleting the enrollments or associated users.
  2. Delete Meta Link Enrollments and Associated Users:

    • Completely removes Meta Link enrollments for expired courses, ensuring a clean and efficient Moodle environment.
  3. Reactivate Meta Link Enrollments:

    • Automatically reactivates disabled Meta Link enrollments if the main course's end date is removed or extended, ensuring that enrollments remain up-to-date.
  4. Customizable Settings:

    • Administrators can configure the plugin to choose between disabling or deleting Meta Link enrollments based on their specific needs.
  5. Scheduled Tasks:

    • The plugin integrates with Moodle's cron system to automate the cleanup process, ensuring that Meta Link enrollments are managed without manual intervention.
  6. Category-Based Filtering:

    • Administrators can filter courses by category to apply the cleanup actions only to specific groups of courses.
  7. Capability-Based Access Control:

    • Access to the plugin's functionality is restricted to users with the local/metacleaner:manage capability, ensuring that only authorized administrators can configure and execute the plugin's actions.
  8. Privacy Compliance:

    • MetaCleaner does not store any personal data, making it fully compliant with Moodle's Privacy API and GDPR requirements.

How It Works

  1. Configuration:

    • Administrators can configure the plugin via the Moodle admin interface under Site Administration > Plugins > Local Plugins > MetaCleaner.
    • Options include enabling/disabling the plugin, selecting the desired action (disable, delete, or reactivate), and filtering by course category.
  2. Automated Cleanup:

    • The plugin runs as part of Moodle's scheduled tasks (cron jobs) to automatically process Meta Link enrollments for courses with expired end dates.
  3. Reactivation Logic:

    • If a course's end date is removed or extended, the plugin automatically reactivates any previously disabled Meta Link enrollments for that course.
  4. Manual Execution:

    • Administrators can manually trigger the plugin's functionality via the admin interface for immediate cleanup. (Scheduled Tasks)

Installation

  1. Upload the plugin to the metacleaner directory in your Moodle installation.
  2. Navigate to Site Administration > Notifications to complete the installation process.
  3. Configure the plugin settings under Site Administration > Plugins > Local Plugins > MetaCleaner.

Use Cases

  • Course Cleanup:

    • Automatically clean up Meta Link enrollments for courses that are no longer active, reducing clutter and improving system performance.
  • Dynamic Enrollment Management:

    • Ensure that Meta Link enrollments remain accurate and up-to-date by reactivating them when course end dates are extended.
  • Category-Specific Management:

    • Apply cleanup actions only to specific course categories, providing greater control over enrollment management.

Technical Details

  1. Capabilities:

    • The plugin defines the capability local/metacleaner:manage, which restricts access to the plugin's functionality to authorized users (e.g., administrators or managers).
  2. Scheduled Tasks:

    • MetaCleaner integrates with Moodle's cron system to automate the cleanup process. The tasks are executed periodically based on the site's cron schedule.
  3. Privacy API:

    • MetaCleaner implements Moodle's Privacy API and declares that it does not store or process any personal data.
  4. Database Interaction:

    • The plugin uses Moodle's database API ($DB) to interact with the enrol and user_enrolments tables, ensuring compatibility with all supported database systems (e.g., MySQL, PostgreSQL).
  5. Error Handling:

    • The plugin includes robust error handling to ensure that issues (e.g., database conflicts) are logged and do not disrupt the cleanup process.

Developer Information


Changelog

Version 1.0.0 (2025-03-15)

  • Initial release of MetaCleaner.
  • Added functionality to disable, delete, or reactivate Meta Link enrollments.
  • Integrated with Moodle's cron system for automated cleanup.
  • Implemented category-based filtering and capability-based access control.

License

MetaCleaner is an open-source plugin released under the GNU General Public License v3.


Why Choose MetaCleaner?

MetaCleaner simplifies the management of Meta Link enrollments, saving administrators time and effort while ensuring a clean and efficient Moodle environment. With its flexible configuration options and automated tasks, MetaCleaner is the perfect tool for managing enrollments in large Moodle installations.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7

Contributors

Sadik Mert (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Mostrar comentarios
Please login to post comments