For Learning Management Systems
An AI-powered bridge between physical examination papers and Moodle LMS. Features Smart Scan using YOLO & CRNN models, CIA exam management, attempt control, and automated email notifications.
Academic institutions transitioning to digital grading face major logistical hurdles with physical answer scripts.
Individually scanning, renaming, and uploading hundreds of answer scripts is time-consuming and inefficient.
Manual processes are prone to uploading wrong files or mislabeling student submissions.
Unverified uploads can compromise the chain of custody for examination papers.
Students lack a mechanism to verify their paper was scanned correctly before grading.
A 3-Step “Upload → Verify → Push” workflow with AI-powered Smart Scan and secure student verification.
Staff uploads scanned PDFs via drag & drop. AI extracts metadata automatically.
YOLO detects regions, CRNN reads register numbers and subject codes from paper.
Students verify their papers and submit to Moodle, ensuring non-repudiation.
An intelligent intermediary between the physical examination hall and the digital grading environment, ensuring secure validation and student verification at every step.
A comprehensive feature set covering the entire examination submission lifecycle.
Scanner agent with YOLO object detection and CRNN text recognition extracts register numbers and subject codes from scanned answer sheets automatically.
HuggingFace SpacesDrag and drop hundreds of scanned files at once. Per-file savepoints ensure partial failures don't lose progress. Duplicate detection built-in.
Staff PortalFull CIA exam type separation. Uniqueness constraints respect exam type. Students can submit CIA-1 and CIA-2 independently.
Exam ManagementAdmin-controlled lock/unlock per attempt. Attempt 2 requires Attempt 1 completed. Each attempt creates a separate artifact.
Admin ControlSendGrid/SMTP integration sends upload confirmation emails to students via Moodle email lookup. Fully async and non-blocking.
SendGridStudents verify their papers via secure PDF viewer, view dashboard stats, and submit to Moodle — all with real-time status updates.
Moodle SSOAdmin maps subject codes to Moodle assignments and register numbers to Moodle usernames. Auto-discover from Moodle courses.
Admin PanelSelf-healing file persistence for cloud deployments. File content stored in PostgreSQL to survive Render’s ephemeral filesystem.
Cloud-Readybcrypt password hashing, AES-256 token encryption, JWT authentication, SHA-256 file hashing, and complete audit logging.
Enterprise GradeDesigned for data integrity, security, and complete auditability
Scanned Answer Sheets
PostgreSQL + JWT
YOLO + CRNN Models
Assignment Submissions
| Model | Description |
|---|---|
| ExaminationArtifact | Core entity — UUID, file path, SHA-256 hash, metadata, workflow status, exam_type, attempt, file_content (binary) |
| SubjectMapping | Maps Subject Code → Moodle Assignment ID + Course ID with exam_type support |
| UsernameRegMapping | Maps Moodle username → Register Number for student lookup |
| StaffUser | Admin/staff accounts with bcrypt-hashed passwords and role flags |
| StudentSession | Ephemeral sessions with AES-256 encrypted Moodle access tokens |
| AuditLog | Immutable ledger of all actions with IP addresses and timestamps |
| SubmissionQueue | Retry buffer for Moodle API failures — no submission is lost |
12-round password hashing
Fernet for Moodle tokens
Complete chain of custody
Short-lived access tokens
File integrity verification
Configurable origin whitelist
A streamlined 3-phase process ensuring secure and verified submissions
Map subject codes to Moodle Assignment IDs (auto-discover from Moodle)
Map register numbers to Moodle usernames
Exam cell scans papers: {RegNo}_{SubCode}.pdf
Staff authenticates via JWT
Drag & drop scanned files with duplicate detection
Filename validation, SHA-256 hashing, mapping check
Optional AI extraction via scanner agent + HF Spaces
SendGrid notifies students of uploaded papers
Moodle credentials authentication
View papers tagged with register number
Secure PDF viewer to verify paper
One-click submission to Moodle LMS
Status updates to SUBMITTED_TO_LMS
Complete RESTful API with authentication, file management, extraction, and submission handling
# Staff Login curl -X POST https://exam-middleware.onrender.com/auth/staff/login \ -F "username=admin" \ -F "password=admin123" # Upload File (with token) curl -X POST https://exam-middleware.onrender.com/upload/single \ -H "Authorization: Bearer YOUR_TOKEN" \ -F "file=@611221104088_19AI405.pdf" \ -F "exam_type=CIA-1" # Health Check curl https://exam-middleware.onrender.com/health
Production-ready on Render.com with ML inference on HuggingFace Spaces
FastAPI application deployed as a Docker web service with managed PostgreSQL. Auto-seeding admin user, database-backed file storage for ephemeral filesystem.
https://exam-middleware.onrender.com
ML models (YOLO object detection + CRNN text recognition) offloaded to HF Spaces. Eliminates heavy PyTorch/OpenCV packages from the server Dockerfile.
https://kavinraja-ml-service.hf.space
Get up and running locally in minutes
git clone https://github.com/d-kavinraja/Intelligent-Examination-Submission-Framework-for-LMS.git cd Intelligent-Examination-Submission-Framework-for-LMS/exam_middleware
python -m venv venv # Windows .\venv\Scripts\activate # Linux / Mac source venv/bin/activate
pip install -r requirements.txt
copy .env.example .env
psql -U postgres -c "CREATE DATABASE exam_middleware;" python init_db.py
python run.py
Clean, modular architecture following Python best practices
Required Moodle setup for Web Services integration
bcrypt with 12 rounds
AES-256 (Fernet)
Short-lived access tokens
SHA-256 hash + format checks
All operations tracked with IP
Configurable origin whitelist