Files
unsupervised-scheduler/unsupervised-schedular.php
T
thatguygriffandClaude Opus 4.8 bf29162587
CI / Tests (PHP 8.1) (pull_request) Successful in 48s
CI / Tests (PHP 8.2) (pull_request) Successful in 47s
CI / No Debug Code (pull_request) Successful in 3s
CI / PHPStan (pull_request) Successful in 2m51s
CI / Coding Standards (pull_request) Successful in 3m2s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m37s
CI / Build Plugin Zip (pull_request) Skipped
Add group-class enrolment deadline with instructor late-enrolment override
Group classes gain an instructor-set enrolment deadline (new
us_offerings.enrollment_deadline column) that defaults to the first day of
the class (term_start). Past the deadline students can no longer self-enrol:
the enrolment endpoint rejects it (403 enrollment_closed) and the front-end
class list shows "Enrolment has closed." in place of the Enrol button.

Instructors keep a manual path: the "Add students directly" control on each
class's details page now renders for public classes too (not just
invite-only) and deliberately bypasses the deadline and capacity, so a
student can be added as a late enrolment after the class has closed. Past
the deadline the details page labels these as late enrolments.

Bumps USC_VERSION to 1.1.3 for the schema change.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-24 10:19:38 -03:00

44 lines
1.2 KiB
PHP

<?php
/**
* Plugin Name: Unsupervised Scheduler
* Plugin URI: https://git.unsupervised.ca/Unsupervised/unsupervised-scheduler
* Description: Instructor/student lesson scheduling for WordPress.
* Version: 1.1.3
* Requires at least: 6.2
* Requires PHP: 8.1
* Author: Unsupervised
* Author URI: https://unsupervised.ca
* License: GPL-2.0-or-later
* Text Domain: unsupervised-schedular
* Update URI: https://git.unsupervised.ca/Unsupervised/unsupervised-scheduler
*/
declare(strict_types=1);
namespace Unsupervised\Schedular;
if (! defined('ABSPATH')) {
exit;
}
define('USC_VERSION', '1.1.3');
define('USC_PLUGIN_FILE', __FILE__);
define('USC_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('USC_PLUGIN_URL', plugin_dir_url(__FILE__));
define('USC_TABLE_AVAILABILITY', $GLOBALS['wpdb']->prefix . 'us_availability');
define('USC_TABLE_LESSONS', $GLOBALS['wpdb']->prefix . 'us_lessons');
require_once USC_PLUGIN_DIR . 'vendor/autoload.php';
register_activation_hook(__FILE__, static function (): void {
(new Installer())->run();
});
register_deactivation_hook(__FILE__, static function (): void {
flush_rewrite_rules();
});
add_action('plugins_loaded', static function (): void {
Plugin::boot();
});