# Working system settings

Staff and administrators open Settings. Sections include institution/support details, academic year, security and public registration, AI chat, attendance policy, compressed database backups, readiness checks and recent settings activity.

Save changes applies validated preferences with revision checks to prevent overwriting another manager's edits. Inactivity timeout (5–120 minutes) and maximum session duration (1–24 hours) apply to existing sessions on their next authenticated request. Student registration can be closed without disabling management account creation. AI can be disabled across both chats; optional model override applies to subsequent replies. API keys remain in environment/config/openrouter.local.php. Institution name appears on newly generated attendance receipts; closed receipts retain their original snapshot. Support details and academic year are displayed in the settings overview; course year/grade rules are not changed.

Backup creation exports database base-table definitions and rows to compressed SQL, up to 250 MB uncompressed. Staff/admin-only POST actions with CSRF validation handle downloads/deletion. Files have random names and live in private storage/backups, protected by Apache denial rules and restrictive file permissions. Use SLPS_PRIVATE_STORAGE outside your web root for hosting configurations that do not enforce .htaccess. The export uses a transaction snapshot for InnoDB data; avoid schema changes during export. It does not include uploads, source/configuration, database views, triggers, routines or events. Download backups before migrating hosts, and back up uploads separately. Restore manually using phpMyAdmin/database tools with appropriate maintenance precautions. This page does not perform database restores or scheduled background backups.

No new migration is required for Settings if the original system_settings, system_backups and system_audit_log tables exist. Login attendance still requires database/migrations/20261016_login_attendance.sql from the previous update. Keep local settings/configuration/uploads when copying the package. Refresh Ctrl+F5.

Tests cover validation, binary-safe SQL output, compressed backup creation, failure cleanup, and regression tests for AI/attendance. A live XAMPP/MySQL database was not available; verify saving and backup downloads locally after installation.
