User Management
Complete lifecycle management of every student and teacher in the department.
Student Management (`admin/students.php`)
The student management module provides a highly secure, paginated table view of all students enrolled under the HOD's department, featuring complete lifecycle controls.
- Multi-Tenant Student Directory:
A unified directory that dynamically alters visibility based on the logged-in user's role. Directors can view the entire college, while HODs are strictly restricted to students matching their specificdepartmentorhod_id. Includes pagination (20 items/page).Core Benefit: Eliminates the need for separate codebases for Directors and HODs. The data access layer securely handles tenant boundaries automatically. - Compact Analytics Strip & Class Filtering:
Instantly displays real-time counts for Total Students, Active Students, and Inactive Students via SQL count aggregations. Includes a dropdown filter to instantly narrow the list down to specific classes (e.g., TY-BCA Div A).Core Benefit: The HOD can instantly identify exactly how many students are currently blocked from the system and isolate them by class without running complex reports. - One-Click Account Status Toggles:
Direct inline actions to "Block" or "Activate" a student's login privileges instantly.Core Benefit: Allows administrators to instantly revoke system access for students pending disciplinary actions or fee defaults without deleting their academic records. - Profile Mutability & Secure Password Reset:
Allows the HOD to edit core student data (Name, Email, Phone, Roll Number, and Class assignment). Also includes a dedicated Password Reset modal to bypass forgotten credentials (minimum 6 characters, hashed securely via `password_hash`).Core Benefit: Massively reduces IT support tickets. HODs can directly resolve the #1 student issue ("I forgot my password") in 5 seconds.
Teacher Management (`admin/teachers.php`)
Provides a comprehensive system for onboarding, tracking, and managing the faculty members within the specific department.
- Transactional Faculty Onboarding:
A robust "Add Teacher" form that captures both core `users` data (Name, Email, Username, Password) and specialized `teachers` data (Employee ID, Designation, Qualification, Experience, Joining Date).Core Benefit: Uses strict SQLTransactions. If adding the teacher's profile fails, the system rolls back the user account creation, ensuring zero corrupted or orphaned database rows. - Automatic Department Association:
When an HOD creates a new teacher, the system automatically binds that teacher to the HOD's specific department andhod_idin the background.Core Benefit: Prevents administrative errors. A teacher can never be accidentally assigned to the wrong department during manual data entry. - Advanced Search & Analytics:
Unlike students, the teacher directory features a full-text search engine allowing lookups by Full Name, Email, or specific Employee ID. It also includes the compact Total, Active, and Inactive KPI cards.Core Benefit: Rapid discovery. Even in massive departments, the HOD can locate a specific staff member's profile instantly via their Employee ID. - Full Profile Maintenance & Access Control:
Similar to students, the HOD maintains full control to Edit Profiles, Reset Passwords, and instantly Block/Activate staff accounts via secure dropdown menus on the table rows.Core Benefit: Ensures immediate offboarding security. If a staff member leaves the organization, their system access can be revoked with a single click.
Data Relationships
erDiagram
DEPARTMENT ||--o{ TEACHER : employs
DEPARTMENT ||--o{ STUDENT : enrolls
TEACHER ||--o{ SUBJECT : teaches
STUDENT ||--o{ SUBJECT : learns
TEACHER {
string employee_id
string specialization
float rating
}
STUDENT {
string enrollment_no
string class
string division
}