Skip to content
Laviyx Learn

Try

Final-year project

Online Examination Portal

A web portal where teachers build question banks and timed exams, and students take them online with a server-controlled timer, automatic marking, results, ranks and basic anti-cheating checks.

Intermediate 8–10 weeks 2–4 studentsUpdated

Node.jsExpressPostgreSQL or MySQLHTML, CSS, JavaScript or React

The problem

Colleges and coaching centres run regular tests, and marking them by hand takes days. An online exam portal lets a teacher set a test once and get marked results instantly. The hard parts are fairness: every student gets the same time, answers cannot be seen in the browser, and a slow connection must not lose work.

Features to build

  • Roles for admin, teacher and student
  • Question bank with multiple-choice questions, tagged by subject, topic and difficulty
  • Create an exam: duration, start and end window, number of questions per topic and negative marking
  • Each student gets questions and options in a random order
  • A timer controlled by the server; answers are saved as the student goes and the exam submits automatically when time ends
  • Automatic marking, with results, rank and topic-wise scores
  • Tab-switch count recorded during the exam for the teacher to review
  • Results export to CSV

Suggested data model

TableKey columns
questionsid, subject, topic, difficulty, text, options (JSON), correct_option
examsid, title, duration_minutes, starts_at, ends_at, negative_marks
attemptsid, exam_id, student_id, started_at, deadline_at, submitted_at, score
attempt_answersattempt_id, question_id, position, chosen_option, answered_at

Add a unique constraint on attempts (exam_id, student_id) so a student can attempt each exam only once.

Build plan

  1. 1

    Design the data

    Create the tables and constraints. Keep correct answers only in the database, never in what is sent to the browser.

  2. 2

    Teacher side

    Build pages to add questions, filter the bank, and create exams with their rules.

  3. 3

    Start an attempt

    When a student starts, pick their questions, store the order, and set deadline_at on the server as start time plus duration.

  4. 4

    Save answers

    Save each answer with an API call as it is chosen. Reject answers that arrive after deadline_at plus a few seconds of grace.

  5. 5

    Mark and rank

    On submit or time-out, mark the attempt in one transaction. Use a window function such as RANK() over the scores to rank students.

  6. 6

    Reports and testing

    Build result pages and CSV export, and test slow networks, page refreshes and two tabs open at once.

Learn these first

Each part of the project is taught in one of these free lessons.

Make it stand out

  • Question types beyond MCQ: numeric answers and multiple correct options
  • Bulk import of questions from a spreadsheet
  • Analytics: which questions most students got wrong
  • A practice mode with explanations shown after each answer

Viva and interview questions

Try to answer each one aloud before you open it.

  • Why should the timer be controlled by the server?

    A timer that lives only in the browser can be paused or changed by the student. The server stores the deadline and rejects late answers, while the browser timer only displays the time left.

  • How do you keep answers secret?

    The browser receives only the question text and options, never which option is correct. Marking happens on the server after the answers are submitted.

  • What happens if the student's internet drops?

    Each answer is saved as it is chosen, so nothing already answered is lost. When the student reconnects before the deadline, the page reloads their saved answers and the remaining time from the server.

  • How do you calculate ranks with SQL?

    Use a window function: SELECT student_id, score, RANK() OVER (ORDER BY score DESC) FROM attempts WHERE exam_id = ?. Students with equal scores get the same rank.

  • Can tab-switch detection stop cheating?

    Not fully. It only records when the page loses focus. It is a signal for the teacher to review, not proof. Random question order and time limits do more to reduce copying.

What to put in your project report

  1. Abstract: the problem, your solution and the result in one paragraph.
  2. Introduction and problem statement: who has the problem and why it matters.
  3. Requirements: the features (functional) and qualities such as speed and security (non-functional).
  4. Design: architecture diagram, database tables or data flow, and screen layouts.
  5. Implementation: the main modules and the most interesting code, explained.
  6. Testing: the test cases you ran, with inputs, expected and actual results.
  7. Results: screenshots or numbers that show the project working.
  8. Conclusion and future scope: what you achieved and what you would add next.

Your college may give its own format. Follow that first, and use this list to check nothing is missing.

All project ideas →