Back to projects
Group Project2026

A COMPUTER-BASED FILL-IN-THE-GAP EXAMINATION SYSTEM

GROUP 3 CPE508COMPUTER SCIENCE AND ENGINEERINGFACULTY OF COMPUTING SCIENCE AND ENGINEERING

Abstract

Manual preparation, invigilation, marking and compilation of examinations are slow, stressful and prone to error, particularly for large classes. Fill-in-the-gap examinations are harder to computerise than multiple-choice tests because students type their own answers, which must be compared with the acceptable responses while allowing for alternative spellings and minor typing errors. This report presents Fill-Gap, a computer-based fill-in-the-gap examination system developed by Group 3 for CPE 508. Fill-Gap is a three-layer web application with a React and TypeScript frontend, a NestJS REST API and a PostgreSQL database accessed through the Prisma ORM. Administrators manage faculties, departments, courses, lecturer-course assignments and student accounts, including bulk import from Excel. Lecturers create examinations, organise fill-in-the-gap questions by topic with multiple accepted answers and linked question chains, set how many questions are drawn from each topic, and register eligible students. When a student starts an examination, the server generates an individual paper by solving a chain-preserving subset-sum selection per topic and shuffling the result with the Fisher–Yates algorithm. Answers are autosaved, the deadline is enforced by the server, and expired attempts are submitted automatically. Answers are graded in Strict mode or in Non-Strict mode using Levenshtein edit distance, scores are preserved with a complete audit trail, and results for the whole class are exported to Excel.

Problem statement

The traditional process of preparing and administering examinations involves significant manual activity that is time-consuming and prone to error. Lecturers must manually prepare questions, organize them by topic, register students, and mark responses. Specific challenges include the time required for manual preparation and grading, human error in score calculation, difficulties in managing question organization and random distribution, challenges in enforcing examination duration consistently, and inefficiencies in record management and result compilation.

Objectives

  • Develop a secure, role-based examination system with separate interfaces for administrators, lecturers, and students.
  • Provide an administrative interface for managing student records, faculties, departments, courses, and lecturer-course assignments.
  • Enable lecturers to create and manage examination topics and fill-in-the-gap questions with accepted answers.
  • Implement a question selection mechanism that randomly selects a predetermined number of questions from each topic and presents them in a shuffled order.
  • Develop a server-authoritative examination timer that controls duration and automates submission upon expiration.
  • Implement automatic grading by comparing student responses with accepted answers and calculating scores.
  • Provide functionality for managing and exporting results in Excel format.

Methodology

The system was developed using an incremental, phased approach. Requirements were analyzed, and a domain model and database schema were designed before coding began. Implementation was phased into nine stages: project setup, academic structure, exam/topic configuration, participant management, attempt/question generation, grading engine, submission/calculation, Excel export, and frontend integration. The backend used NestJS and Prisma/PostgreSQL to handle business logic, including a grading service that utilizes Levenshtein edit distance for non-strict grading and a question-paper generation algorithm that solves a chain-preserving subset-sum problem followed by a Fisher–Yates shuffle. The frontend was built as a responsive single-page application with React, TypeScript, and Tailwind CSS.

Results

The project delivered a working, three-layer web-based examination system that enables administrators to manage academic structures and lecturers to create and conduct fill-in-the-gap examinations. Features include automated question paper generation with topic-based random selection, server-authoritative timed attempts, automatic grading with Strict and Non-Strict modes, and Excel result exportation. The system was demonstrated to stakeholders, validating its ability to conduct, grade, and record examinations in a fair and auditable manner.

Conclusion

Fill-Gap effectively demonstrates that fill-in-the-gap examinations can be automated. The system successfully addresses identified manual limitations through server-authoritative timing, randomized paper generation, tolerant grading algorithms, and comprehensive auditing. Stakeholder feedback provided a clear roadmap for future enhancements, suggesting that with the recommended features, the system is a practical solution for conducting examinations at scale.

Technologies

ReactTypeScriptNestJSPostgreSQLPrisma ORMTailwind CSSViteDocker

Keywords

fill-in-the-gap examinationcomputer-based testingautomated gradingweb applicationstudent record management

Source document

Fillgap_CPE508_Group3_Report.pdf