AAKTUNotes

Online Examination System with MySQL

Timed online exams with a random paper for every student, auto-evaluation and a full examiner panel.

PythonFlaskMySQLintermediate3578 lines
500

One-time purchase — source code, database, README and report outline, all in a single ZIP.

No account needed — pay & download instantly

Screenshots

Tap any screenshot to open it full size. These are from the project actually running — not mockups.

About this project

A complete online examination system built the way a college actually runs one. The examiner creates subjects, fills a question bank, and publishes timed exams. Students log in, appear for the exam, and get their result with a full answer key the moment they submit.

The part that lifts this above a normal CRUD project is that every student gets a different paper. Questions are pulled at random from the subject's bank for each attempt, so two students sitting next to each other cannot copy from one another - and that single design decision is usually the first thing an examiner asks about in the viva.

The exam screen was built assuming students will try to get around it. The countdown runs on the server, not in the browser, so changing the system clock or editing the timer in DevTools gains nothing. Correct answers are never sent to the browser during the exam, so viewing the page source shows nothing useful. Every answer saves the instant it is picked, so a power cut or a closed browser does not wipe the paper. Leaving the exam tab is counted server-side, and after three warnings the paper is submitted automatically. Scores are computed from the database, never from anything the browser sends.

The examiner side is a working panel, not a placeholder: subjects, a question bank with CSV bulk import, exams with duration, pass mark and optional negative marking, a results table with rank and CSV export, and an analytics dashboard. The most useful report there is 'questions students get wrong most often' - it tells a teacher which topic the class did not understand, which a plain marks list never does.

MySQL is used properly. Every table is InnoDB with real foreign keys and ON DELETE CASCADE, so deleting a subject clears its questions, exams and attempts with no orphan rows left behind - and there is an automated test that proves the cascade actually fires.

Features

  • Every student gets a different paper - questions picked at random per attempt
  • Countdown timer runs on the server, so changing the system clock gains nothing
  • Correct answers are never sent to the browser during the exam
  • Answers save the instant they are picked - a power cut does not wipe the paper
  • Auto-submit when time runs out, even if the browser was closed
  • Tab-switch detection counted server-side, auto-submit after three warnings
  • One attempt per exam, with an unfinished paper resumable at the right time
  • Optional negative marking, with no penalty for skipped questions
  • Instant result with a full answer key - your answer against the correct one
  • Question bank with CSV bulk import (75 ready questions across 3 subjects included)
  • Examiner panel: subjects, questions, exams, students, results
  • Publish or hide an exam without deleting it
  • Results table with rank, pass/fail, tab switches and CSV export for Excel
  • Analytics dashboard with pass rate, subject averages and hardest questions
  • MySQL with InnoDB, real foreign keys and ON DELETE CASCADE throughout
  • Database and tables are created automatically - no .sql file to import
  • PBKDF2-SHA256 password hashing with a per-user salt
  • Every query parameterised; a SQL injection attempt is part of the test suite
  • check_setup.py tells you exactly what is wrong if MySQL is not connecting
  • 21 automated self-tests you can run in front of the examiner
  • No CDN anywhere - the whole UI works with the internet switched off

Modules

Authentication (student and examiner roles)Subject managementQuestion bank with CSV importExam creation and publishingTimed exam screen with anti-cheatingAuto-evaluation and resultStudent result historyExaminer results and CSV exportAnalytics dashboard

Tools

  • Python 3.8+
  • Flask (web framework)
  • MySQL / MariaDB (XAMPP works out of the box)
  • PyMySQL (database driver)
  • VS Code (or any editor)
  • Any web browser

Requirements

Python 3.8 or newer, and MySQL. XAMPP is the easiest way to get MySQL - install it, open the Control Panel and press Start next to MySQL. Then one command installs the libraries: pip install -r requirements.txt (Flask and PyMySQL, about 5 MB). The database and all its tables are created automatically on first run - there is no .sql file to import. Works on Windows, Linux and Mac.

How to run

1. Extract the ZIP.
2. Start MySQL - open the XAMPP Control Panel and press Start next to MySQL.
3. Open CMD and go to the folder:  cd path\to\online-examination-system
4. Install the libraries:  pip install -r requirements.txt
5. Check everything is ready:  python check_setup.py
6. Load the demo data:  python demo.py
7. Start the app:  python app.py
8. Open http://127.0.0.1:5000 in your browser.
9. Login:  admin / admin123   (examiner)   or   student / student123

If MySQL uses a password on your machine, set it once before step 5:
    set OES_DB_PASSWORD=yourpassword

Before a viva, also run 'python selftest.py' - 21 checks pass in front of the examiner.

The same steps are in README.md inside the ZIP, along with a troubleshooting table.

What you get in the ZIP

  • 📁 Full source code — commented throughout, so you can explain it in the viva
  • 🗄️ Database — the schema builds itself on first run, with sample data
  • 📖 README.md — step-by-step run instructions, database design, viva questions and troubleshooting
  • 📝 docs/report-outline.md — the full AKTU project report outline (DFD, ER diagram, testing table, screenshots)
Share on WhatsApp

Other projects