
Weekend Annoying Task Challenge: Smart Online Exam Monitoring System
During an online examination, I noticed how easily students could cheat by switching tabs, searching answers, or leaving the exam window without being detected. I originally built this Online Exam Monitoring System 8 months ago to address that problem, and for the AWS Weekend Challenge, I revisited, improved, and completed it with advanced security, real-time cheating detection, and AWS deployment.
Weekend Annoying Task Challenge:
Smart Online Exam Monitoring System
Introduction
A few months ago, while taking an online examination, I realized something that bothered me: it was surprisingly easy to cheat. Students could open another tab, search for answers on Google, minimize the browser, or even use developer tools without anyone noticing. The entire process relied heavily on trust and manual monitoring.
That experience inspired me to build an Online Exam Monitoring System. I started working on it about 8 months ago as a personal learning project. The initial version included basic examination functionality, but I always wanted to make it more secure and practical for real-world use.
When I saw the AWS Weekend Challenge: Turn One Annoying Task Into an App, I immediately thought about this project. The challenge was the perfect opportunity to revisit my old work, improve it, and finally complete the vision I had in mind.
Today, the project includes real-time cheating detection, fullscreen enforcement, a three-strike policy, automatic exam termination, secure authentication, responsive design, and deployment on AWS. What started as an observation during an online exam has now become a cloud-powered solution designed to help educational institutions conduct fair and secure assessments.



Vision & What the App Does
The vision behind this application is to make online examinations:
- Secure
- Fair
- Automated
- Accessible
The Smart Online Exam Monitoring System allows students to register, log in, and take MCQ-based examinations while the system continuously monitors their behavior.
Key Features
- Student Registration and Login
- 10 MCQ Questions
- Fullscreen Enforcement
- Countdown Timer
- Real-Time Cheating Detection
- Three-Strike Policy
- Automatic Exam Termination
- Automatic Grading
- Exam History
- Dark Mode
- Responsive Design
- Resume Exam Support
- Session Timeout
- Login Rate Limiting
- SQL Injection Protection
- CSRF Protection
- Password Hashing (bcrypt)

-
The Problem It Solves
One of the most annoying tasks for teachers during online examinations is monitoring students.
Teachers often ask:
- Is the student searching for answers?
- Did they switch tabs?
- Did they minimize the browser?
- Are they using developer tools?
- Did they leave fullscreen mode?
Manually monitoring dozens or hundreds of students is almost impossible.
This project solves that problem by automatically detecting suspicious activities and enforcing examination rules in real time.
How the Application Works
The examination process is simple:
Step 1
The student creates an account and logs in securely.
Step 2
The system displays examination rules:
- Stay in fullscreen.
- Do not switch tabs.
- Do not minimize the window.
- Do not use developer tools.
Step 3
The student clicks Start Exam, and fullscreen mode is enabled automatically.
Step 4
The system presents 10 MCQ questions.
Step 5
A 10-minute countdown timer starts.
Step 6
During the exam, the application continuously monitors:
- Tab switching
- Window minimizing
- Fullscreen exits
- Mouse leaving the browser
- F12 key presses
- Ctrl+Shift+I shortcuts

-
Step 7
The Three-Strike Policy is enforced:
Violation | Action |
|---|---|
Strike 1 | Warning |
Strike 2 | Final Warning |
Strike 3 | Exam Terminated + Marked as Cheated |
Step 8
Students can view:
- Score
- Correct Answers
- Time Taken
- Violation Count
- Exam History
How I Built It
This project was developed using:
- HTML
- CSS
- JavaScript
- PHP
- MySQL
Architecture
The application follows the MVC architecture pattern and includes:
- Front Controller
- 6 Controllers
- 10 Views
- Environment Configuration (
.env)
- Responsive UI Components
Development Challenges
Some of the biggest challenges included:
- Detecting cheating events accurately.
- Maintaining session security.
- Implementing localStorage recovery.
- Preventing SQL injection attacks.
- Creating a responsive design.
I used JavaScript event listeners extensively to monitor browser behavior and PHP security practices to protect user data.
cheating-prevention-system/
├── index.php # Front controller (all routes)
├── bootstrap.php # Env loader, autoloader, session, DB init
├── .env # Database credentials and config
├── .htaccess # Apache URL rewriting rules
├── sync.bat # Sync script for XAMPP htdocs
│
├── controllers/ # MVC Controllers
│ ├── AuthController.php # Login, register, logout
│ ├── ExamController.php # Start exam, exam interface
│ ├── HomeController.php # Home page
│ ├── LogEventController.php # AJAX violation logging API
│ ├── PageController.php # Static pages (rules, learning, courses)
│ └── ResultController.php # View and submit results
│
├── includes/ # Core libraries
│ ├── Router.php # URL routing to controllers
│ ├── Database.php # MySQL singleton connection
│ ├── auth.php # Authentication functions
│ └── functions.php # Helper functions (e(), CSRF, rate limiting)
│
├── views/ # PHP view templates
│ ├── layout.php # Main layout (header, nav, footer)
│ ├── home.php # Home page with hero and features
│ ├── rules.php # Exam rules and regulations
│ ├── learning.php # Web development learning content
│ ├── courses.php # Course listings with tech icons
│ ├── start_exam.php # Pre-exam info and fullscreen entry
│ ├── exam.php # Exam interface (questions, timer)
│ ├── result.php # Results dashboard and history
│ ├── auth_login.php # Login form
│ └── auth_register.php # Registration form
│
├── assets/
│ ├── css/
│ │ └── style.css # Full stylesheet (dark mode, animations, responsive)
│ └── js/
│ ├── main.js # Theme toggle, mobile menu, utilities
│ ├── exam.js # Exam logic, progress persistence, keyboard nav
│ └── detection.js # Cheating detection engine
│
└── db/
├── database.sql # Complete schema + sample questions
└── violations_tables.sql # Violation tracking tables
AWS Services Used
To deploy the application, I used AWS services:
Service | Purpose |
|---|---|
Amazon EC2 | Hosts the PHP application |
Amazon RDS | Stores users and exam data |
Amazon CloudWatch | Monitoring and logs |
Architecture Overview
Student Browser | vAmazon EC2(PHP + Apache) | vMVC Controllers | vAmazon RDS (MySQL) | vResults + Violation LogsApplication Trigger Flow
Login ↓Start Exam ↓Enable Fullscreen ↓Start Timer ↓Initialize Monitoring ↓Detect Violations ↓Submit or Terminate Exam
Security Features
Security was a major focus of this project.
Implemented protections include:
- bcrypt Password Hashing
- CSRF Tokens
- Prepared Statements
- Session Timeout (30 minutes)
- Rate Limiting (5 attempts / 15 minutes)
- XSS Prevention
These measures make the application significantly more secure and suitable for real-world use.
What I Learned
This challenge helped me improve my knowledge of:
- AWS Deployment
- Amazon EC2
- Amazon RDS
- Cloud Monitoring
- Secure Authentication
- MVC Architecture
- JavaScript Event Handling
- Responsive Design
Most importantly, I learned that improving an existing project can sometimes teach more than starting a new one.
What started as a university project eight months ago has now evolved into a production-ready cloud application.
Real-World Use Cases
This application can be used by:
- Universities
- Colleges
- Schools
- Training Institutes
- Coding Bootcamps
- Certification Organizations
- Companies conducting hiring assessments
Future Improvements
I plan to add:
- AI-based face detection
- Webcam monitoring
- Multi-language support
- Email notifications
- Analytics dashboard
- AWS Lambda integration
- Amazon Rekognition support
Conclusion
The Smart Online Exam Monitoring System solves one of the biggest challenges in online education: maintaining academic integrity.
By combining secure authentication, automated monitoring, and AWS cloud services, the application reduces manual effort and creates a fair experience for everyone involved.
Although the project was originally built eight months ago, the AWS Weekend Challenge inspired me to revisit it, improve it significantly, and deploy it on AWS.
This experience reinforced an
important lesson: sometimes the best innovations come from improving the tools we have already built.
The complete source code for the Smart Online Exam Monitoring System is available on GitHub. GitHub Repository: https://github.com/iqraurooj111/cheating-prevention-system
Final Notes
Thank you to the AWS Builder Community for organizing this challenge. It was an exciting opportunity to improve an existing project, learn more about AWS services, and share my work with fellow builders.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article