PHP

UISB App — Smart Attendance & Academic Platform

UISB App is a comprehensive academic management system built for the University of Ibadan School of Business, covering the complete academic lifecycle for postgraduate and undergraduate students. It serves six distinct user roles — students, lecturers, exam officers, hub managers, non-academic staff, and super admins — each with a dedicated portal, role-aware dashboard, and a tailored permission set enforced throughout the application.

The platform is built on CodeIgniter 4.7 with CodeIgniter Shield 1.2 for authentication and RBAC, backed by a 47-table MySQL schema across 36 migrations. A decoupled service layer (QrTokenService, PdfService, ExcelService, NotificationService) keeps controllers thin and enables code reuse across the academic, hub, and admin sections. TCPDF handles PDF generation for transcripts and reports; phpspreadsheet handles Excel bulk uploads and exports.

At the academic core is a QR-code attendance system with 30-second TOTP rotating tokens — a SHA256 hash-based approach that prevents replay attacks while tolerating one time-window of network latency. A cron endpoint (protected by CRON_SECRET) auto-creates attendance sessions from the lecture timetable and auto-closes expired ones. Results follow a multi-stage pipeline (draft to submitted to approved or rejected) with automatic grade calculation from CA and exam scores, bulk Excel import with validation, exam-officer approval with rejection feedback, and official TCPDF transcript generation with CGPA calculation.

Beyond academics, the platform includes a multi-hub ecosystem for regional learning centres: an Agriculture module (farm sections, production records, sales transactions), a Retail/Store module (inventory, buy/sell transactions), a Transport module (vehicle fleet, booking requests, trip logging, maintenance scheduling), and a Cybercafe module (computer sessions, hour-based billing). Hub managers operate independently within their assigned hub, while the super admin oversees programmes, courses, sessions, users, and all hub registrations.


UISB App — Smart Attendance & Academic Platform screenshot

Key Features

41 features built into this project

6-role RBAC via CodeIgniter Shield — super_admin
exam_officer
lecturer
student
hub_manager
non_academic_staff
QR-code attendance with 30-second TOTP rotating tokens preventing replay attacks
Cron-driven timetable automation — auto-creates and auto-closes attendance sessions from lecture schedule
Course-governor peer-monitoring system — designated students can log missed attendance as a QR fallback
Multi-stage result pipeline — draft
submitted
approved/rejected with full audit trail (submitted_by
approved_by
timestamps)
Automatic grade calculation from CA and exam scores with manual override capability
Bulk result upload via Excel (phpspreadsheet) with per-row validation and pre-populated download templates
Rejection feedback loop — exam officers return results to lecturer with reason before re-submission
Official transcript PDF generation (TCPDF) with CGPA and semester GPA calculation
Transcript request approval workflow with configurable expiration dates
Course registration tied to programme specialisation with manual elective add/drop
Lecture material upload with per-material visibility toggle and download count tracking
Student project submissions (PDF/Word/PPT/ZIP up to 10 MB) with reviewer feedback
Agriculture hub — farm sections (poultry/fishery/yam/cassava)
production records
sales transactions
Transport hub — vehicle fleet management
booking workflow
trip logging
fuel tracking
maintenance scheduling
Retail hub — store inventory
buy/sell transactions
stock-level monitoring
Cybercafe hub — computer session tracking with hour-based billing and payment recording
Hub activity management with participant tracking
status workflow
and certificate issuance
Notification system — system alerts
grade events
and task assignments with unread count
Document and circular publishing with visibility management and bulk upload support

Challenges & Solutions

Technical problems encountered during development and how each was resolved.

1

Implementing replay-proof QR attendance without burdening students with app installs required a server-side TOTP design: the lecturer's browser fetches a new QR token via a polling API every 30 seconds, and the server validates the scanned token against a ±1 window hash. A course-governor fallback was added so that a designated peer student can manually record attendance if a classmate's QR scan fails, maintaining auditability without blocking the class.

2

Automating attendance session lifecycle without a queue worker was solved with a cron-protected HTTP endpoint that runs every minute. It reads the lecture_timetables table, matches the current day and time window, creates attendance_sessions that do not yet exist, and closes any sessions whose end_time has passed. The endpoint is secured with a CRON_SECRET environment variable validated via hash_equals() to prevent unauthorised calls.

3

Supporting six distinct user roles within a single CodeIgniter 4 app without duplicating view logic required a role-aware DashboardController that redirects each authenticated user to their portal on login, combined with a RoleFilter middleware applied per route group. The AuthGroups config defines a permission matrix so that adding or revoking access to any feature requires only a config change, not new middleware classes.

4

Modelling the multi-hub ecosystem — agriculture, retail, transport, and cybercafe — as independent operational modules under a single hubs table required each module to have its own set of tables cascading off hub_id, with hub managers scoped strictly to their assigned hub. The transport module alone needed four tables (vehicles, bookings, trips, maintenance) with a booking approval workflow mirroring the academic results pipeline, ensuring the same approval-pattern consistency across completely different business domains within the same application.