This project is not covered by Drupal’s security advisory policy.
Locks Drupal LMS courses, manually or on a schedule. A locked course stays in the catalog and keeps its course page, but nobody can take it: its start link shows "Locked" and its start and activity pages are closed.
Features
- Manual lock: a Locked checkbox on the course edit form.
- Scheduled locking: any number of lock and unlock events per course, each a date, time and action. Events take effect on time, without waiting for cron.
- Clear feedback for students: the start link on the course page and catalog cards shows "Locked". Students who are partway through a course when it locks are sent to the course page with a message, including from AJAX actions such as checking an answer.
- Results stay available while the course is locked.
- Bypass permission: the Take locked course group permission lets, for example, teachers preview a locked course. Group admin roles have it.
- Display formatter: Lock events lists upcoming events as "Locks on …" and "Opens on …" dates, with the date format options of the core timestamp formatter.
Requirements
- Drupal 11.2 or later
- Drupal LMS 1.2 or later
Installation and configuration
Install as any other module. The course edit form gets a Locking tab with the Locked checkbox and the schedule. Times are entered in the editor's time zone.
To show students upcoming events, enable the Scheduled locking field under the course group type's Manage display.
Run cron regularly. Scheduled changes are stored on a course the next time it is visited, and cron stores them for courses nobody visits.
Similar projects
Scheduler publishes and unpublishes content on a schedule. Unpublishing a course hides it from the catalog and makes its page inaccessible to students. LMS Scheduling keeps the course visible, only stops it from being taken, and supports any number of lock and unlock events per course.
Project information
- Ecosystem: Drupal LMS
- Created by graber on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
