Course End Date Restriction

Local plugins ::: local_enddateaccess
Maintained by David Cambra
Automates module access restrictions based on the course end date. It dynamically applies a "prevent access" condition to activities with completion tracking.
Latest release:
3 sites
20 downloads
2 fans
Current versions available: 1

Description

This local plugin automates the process of restricting access to course modules based on the course end date. It listens to course update events and automatically applies a "prevent access after course end date" availability restriction to all modules that are tracked for course completion.

Instead of manually editing the deadline for every single activity when a course schedule changes, administrators and teachers can simply update the course end date. The plugin will instantly sync the deadline across all relevant activities.

Key Features

  • Automatic Synchronization: Instantly updates module availability restrictions when the course end date is modified.
  • Safe Merging (Non-destructive): The plugin intelligently parses the existing availability JSON. It safely adds or updates the date restriction without overwriting or destroying existing conditions (e.g., group restrictions, grade requirements, or user profiles).
  • Targeted Action: Only applies restrictions to activities that have course completion criteria enabled, leaving optional resources untouched.
  • Cleanup: If the completion tracking is removed from a module, the plugin automatically removes the injected date restriction while keeping any other conditions intact.

Installation

  1. Download the plugin and extract the .zip file.
  2. Rename the extracted folder to enddateaccess (if it isn't already).
  3. Upload or move the enddateaccess folder into the local/ directory of your Moodle installation.
  4. Log in as an administrator and go to Site administration > Notifications (or run the upgrade script via CLI) to complete the installation process.

Usage

The plugin works silently in the background. To trigger it:

  1. Ensure your course has an End date set in the course settings.
  2. Add an activity (like a Quiz or Assignment) and configure its Activity completion settings to require a specific condition (e.g., "Student must view this activity to complete it" or "Student must receive a grade").
  3. Save the activity. The plugin will automatically append the date restriction based on the course end date.

Requirements

  • Moodle 3.5 or later (Requires version 2018051700).

License

This plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

David Cambra (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments

Show comments
  • Plugins bot
    Mon, 25 May 2026, 8:20 PM
    Approval issue created: CONTRIB-10563
  • Ricardo Caiado
    Fri, 26 June 2026, 8:59 PM
    Hi,

    I would like to know how a quiz activity would behave in the following scenario:

    Activity: Quiz
    Course end date: June 30, 2026
    Access restriction start date: June 20, 2026

    The plugin is enabled.

    Will the student have access to the quiz until June 20 or until June 30?

    Ricardo
  • David Cambra
    Fri, 26 June 2026, 9:32 PM
    Hi Ricardo,

    If that June 20th restriction is configured as a start date ("From"), the student will have access to the quiz from June 20th to June 30th.

    The plugin respects the start date you manually set and automatically adds the closing limit to match the course end date exactly (June 30th).

    Best regards, and thank you for using the plugin!
  • Ricardo Caiado
    Fri, 26 June 2026, 9:38 PM
    "Access restriction start date: June 20, 2026" = The student will have access to the quiz until June 20.
Please login to post comments