Quiz Master
Interactive Web Application for Quiz Management
1. Description
The Quiz Master project is designed to create an interactive web application for quiz management and participation. It provides a platform for administrators to create and manage quizzes on various subjects, while allowing regular users to take quizzes, track their performance history, and view analytics. The system facilitates knowledge assessment through structured subjects, chapters, and well-organized quizzes.
2. Requirements and Setup
Dependencies
- Flask
- Flask-SQLAlchemy
- Matplotlib
- Jinja2
3. Technologies Used
- Flask: Python web framework for building the application
- Flask-SQLAlchemy: ORM extension for database operations
- Matplotlib: Library for generating data visualizations
- HTML5/CSS3: Frontend structure and styling
- Bootstrap: CSS framework for responsive design
- Jinja2: Templating engine for dynamic HTML rendering
- SQLite: Lightweight database engine
4. DB Schema Design
Users_Info
id(Integer, PK): Unique identifier for each userusername(String, Unique): Email address used for loginpassword(String): User's passwordfullname(String): User's full namequalifications(String): Educational backgrounddob(Date): Date of birth
Subjects
Subject_code(Integer, PK): Unique identifier for each subjectsubject_name(String): Name of the subjectsubject_description(String): Detailed description of the subject
Chapter
chapter_id(Integer, PK): Unique identifier for each chapterchapter_name(String): Name of the chapterchapter_description(String): Description of the chapter contentsubject_code_chapter(Integer, FK to Subjects): Associates chapter with a subject
Quiz
id(Integer, PK): Unique identifier for each quizdate_of_quiz(Date): Scheduled date for the quiztime_duration(Time): Allocated time for completionchapter_id(Integer, FK to Chapter): Associates quiz with a chapter
Questions
id(Integer, PK): Unique identifier for each questionchapter_id(Integer): Related chapter IDquestion_title(String): Brief title for the questionquestion_statement(String): Full question textoption1,option2,option3,option4(String): Multiple choice optionscorrect_answer(String): The correct optionquiz_id(Integer, FK to Quiz): Associates question with a quiz
Scores
id(Integer, PK): Unique identifier for each score recorduser_id(Integer, FK to Users_Info): User who attempted the quizquiz_id(Integer, FK to Quiz): Quiz that was attemptedtime_stamp_of_attempt(DateTime): When the quiz was takenscore(Integer): Points earned in the quiz
💡 Design Rationale: The database is designed with a hierarchical structure (Subject → Chapter → Quiz → Question) to enable organized content management. Foreign key relationships ensure data integrity across the system. The separation of
ScoresfromQuestionsallows for efficient tracking of multiple attempts by different users on the same quiz without data duplication.
5. Architecture and Features
Architecture Organization
The Quiz Master project follows a Model-View-Controller (MVC) architecture:
- Models: Located in
models.py, define database tables and relationships using SQLAlchemy ORM - Controllers: Found in
controllers.py, contain route handlers and business logic - Templates: HTML files in the
templates/directory provide the UI using Jinja2 - Static Files: CSS, JavaScript, and generated charts reside in the
static/folder - App Configuration:
app.pyinitializes the Flask application and database
🥞 Separation of Concerns: The project maintains a clear separation of concerns, with models handling data structures, controllers managing application logic, and templates focusing on presentation. This organization facilitates maintenance and future enhancements.
Features Implemented
- Authentication System: Registration, login, and session management to control access based on user roles
- Subject and Chapter Management: Admins can create, update, and organize educational content hierarchically
- Quiz Creation and Management: Interface for building quizzes with multiple-choice questions
- Quiz Taking Interface: User-friendly form for attempting quizzes with immediate scoring
- Quiz History: Persistent storage and display of all quiz attempts and scores
- Search Functionality: Dynamic search across subjects, chapters, and quizzes
- Analytics: Visual data representations showing performance and participation trends
The features are implemented using Flask's routing system to handle HTTP requests, SQLAlchemy for database operations, and Matplotlib for generating custom analytics visualizations that help users understand their performance patterns.