Skip to content

ksandeep18/Quiz_Master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Quiz Master - Complete Documentation

Table of Contents

  1. Introduction
  2. Target Users
  3. System Architecture
  4. Features Overview
  5. User Guides
  6. Technical Implementation
  7. Installation and Setup
  8. Database Schema
  9. Security Features
  10. Troubleshooting

Introduction

Quiz Master is a comprehensive web-based quiz platform designed to facilitate knowledge assessment and learning. Built with Flask and Sqlite , it provides a robust environment for creating, managing, and taking quizzes across various subjects and topics. The platform features role-based access control, advanced analytics, and a user-friendly interface that makes it suitable for educational institutions, training programs, and self-assessment.

Key Features

  • Multi-user system with Admin and Student roles
  • Hierarchical content structure (Subjects → Chapters → Quizzes → Questions)
  • Real-time quiz taking with timer functionality
  • Comprehensive analytics for performance tracking
  • Responsive design for all device types
  • Modern UI with dark theme and interactive elements

Target Users

Administrators (Quiz Masters)

  • Educators and Teachers: Create and manage quizzes for their students
  • Corporate Trainers: Develop assessment modules for employee training
  • Content Creators: Design educational content with integrated assessment

Students (Quiz Takers)

  • School/College Students: Take assigned quizzes and track progress
  • Professional Learners: Self-assess knowledge in specific domains
  • Certification Candidates: Practice for certification exams

System Architecture

Quiz Master is built on a modern web stack with the following components:

  • Backend: Flask (Python web framework)
  • Database: Sqlite (Relational database)
  • ORM: SQLAlchemy (Object-Relational Mapping)
  • Frontend: Bootstrap 5, HTML5, CSS3, JavaScript
  • Authentication: Flask-Login
  • Form Handling: Flask-WTF
  • Chart Visualization: Chart.js

The application follows the Model-View-Controller (MVC) architectural pattern:

  • Models: Database structure and business logic
  • Views: HTML templates with Jinja2 templating
  • Controllers: Flask routes handling requests and responses

Features Overview

Admin Features

  1. Dashboard: Overview of platform usage and statistics
  2. Subject Management: Create, edit, and delete subjects
  3. Chapter Management: Organize content within subjects
  4. Quiz Management: Create timed quizzes with customizable settings
  5. Question Bank: Create multiple-choice questions with correct answers
  6. User Management: Monitor and manage user accounts
  7. Analytics: View platform-wide performance metrics and trends

Student Features

  1. Dashboard: Personal statistics and upcoming quizzes
  2. Quiz Catalog: Browse available quizzes by subject or chapter
  3. Quiz Taking: Take quizzes with timer and progress tracking
  4. Results View: Detailed feedback after quiz completion
  5. Performance History: Track progress over time across subjects

User Guides

Admin Guide

Getting Started as an Admin

  1. Access the Admin Dashboard:

    • Login with your admin credentials
    • You'll be automatically redirected to the admin dashboard
  2. Managing Subjects:

    • Navigate to "Manage Subjects" from the dashboard
    • Create new subjects with descriptive names and details
    • Edit or delete existing subjects as needed
  3. Managing Chapters:

    • Go to "Manage Chapters" to organize content within subjects
    • Each chapter belongs to a specific subject
    • Add descriptive information to help students navigate content
  4. Creating Quizzes:

    • Select "Manage Quizzes" to create new assessments
    • Set parameters like duration, date, and associated chapter
    • Provide clear descriptions to guide students
  5. Adding Questions:

    • From a quiz page, select "Manage Questions"
    • Create multiple-choice questions with four options
    • Designate the correct answer among the choices
  6. User Management:

    • Access "Manage Users" to view all registered students
    • Review individual performance metrics
    • Delete users when necessary (with confirmation)
  7. Analyzing Results:

    • Visit the "Analytics" section to view platform-wide statistics
    • Check quiz participation rates and performance trends
    • Identify areas where students may need additional support

Best Practices for Admins

  • Create a logical hierarchy of subjects and chapters
  • Write clear and concise questions to avoid ambiguity
  • Regularly review analytics to improve content
  • Use descriptive labels for all content elements
  • Balance quiz difficulty to maintain student engagement

Student Guide

Getting Started as a Student

  1. Registration:

    • Navigate to the registration page
    • Provide required information (username, full name, qualification, date of birth)
    • Create a secure password
    • Login with your new credentials
  2. Student Dashboard:

    • View your performance statistics
    • See upcoming and recent quizzes
    • Access quick navigation to subjects
  3. Finding Quizzes:

    • Browse the quiz catalog from "Available Quizzes"
    • Filter by subject or search by keywords
    • View quiz details before starting
  4. Taking a Quiz:

    • Click "Start Quiz" to begin
    • Note the timer in the top section
    • Answer questions by selecting the appropriate option
    • Use the "Mark as Answered" feature to track progress
    • Submit before the timer expires
  5. Reviewing Results:

    • After submission, view your performance summary
    • Review correct and incorrect answers
    • See explanations where provided
  6. Tracking Progress:

    • Visit "Quiz History" to see all completed quizzes
    • Monitor performance trends over time
    • Identify strength and improvement areas

Tips for Students

  • Read questions carefully before answering
  • Manage time effectively during timed quizzes
  • Review incorrect answers to improve understanding
  • Take quizzes in subject areas needing improvement
  • Use the dashboard statistics to track progress

Technical Implementation

The Quiz Master platform was implemented through a systematic development process:

1. Project Setup and Configuration

  • Established Flask application structure
  • Configured PostgreSQL database connection
  • Set up essential extensions (Flask-Login, Flask-WTF, Flask-SQLAlchemy)
  • Created base templates and styling framework

2. Database Design and Implementation

  • Designed relational database schema
  • Created SQLAlchemy models for all entities
  • Implemented relationships and constraints
  • Set up cascading deletion for related records

3. User Authentication System

  • Implemented secure registration with password hashing
  • Created login functionality with session management
  • Set up role-based access control (Admin/Student)
  • Added password protection and validation

4. Admin Functionality Development

  • Created subject, chapter, and quiz management interfaces
  • Implemented question creation and management
  • Developed user management system with performance metrics
  • Built analytics dashboard with statistical calculations

5. Student Experience Design

  • Designed intuitive quiz-taking interface
  • Implemented timer functionality with auto-submission
  • Created detailed results view with correct/incorrect indicators
  • Built performance history tracking

6. UI/UX Enhancement

  • Implemented responsive Bootstrap layout
  • Created custom dark theme with consistent styling
  • Added interactive elements (progress indicators, tooltips)
  • Designed dashboard cards and visualizations
  • Enhanced forms with validation and user feedback

7. Performance and Security Optimization

  • Implemented database query optimization
  • Added CSRF protection on all forms
  • Created input validation and sanitization
  • Added proper error handling and user feedback

8. Testing and Refinement

  • Performed functionality testing across user roles
  • Conducted responsive design testing
  • Fixed bugs and edge cases
  • Enhanced user experience based on testing feedback

Installation and Setup

Follow these steps to set up Quiz Master on your server:

Prerequisites

  • Python 3.7+ installed
  • PostgreSQL database server
  • pip (Python package manager)

Installation Steps

  1. Clone the repository:

    git clone <repository-url>
    cd quiz-master
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Configure environment variables: Create a .env file with the following variables:

    DATABASE_URL=postgresql://username:password@localhost:5432/quizmaster
    SESSION_SECRET=your_secret_key
    
  5. Initialize the database:

    python init_db.py
    
  6. Start the application:

    gunicorn --bind 0.0.0.0:5000 main:app
    
  7. Access the application: Open a browser and navigate to http://localhost:5000

Default Admin Account

During initialization, a default admin account is created:

  • Username: admin
  • Password: admin123

Important: Change the default password immediately after first login.


Database Schema

The application uses the following database models:

User

Stores user account information:

  • id: Primary key
  • username: Unique username
  • password_hash: Securely hashed password
  • full_name: User's full name
  • qualification: Optional qualification information
  • dob: Date of birth
  • is_admin: Boolean flag for role designation

Subject

Represents a knowledge area:

  • id: Primary key
  • name: Subject name
  • description: Optional description

Chapter

Represents a subdivision of a subject:

  • id: Primary key
  • subject_id: Foreign key to Subject
  • name: Chapter name
  • description: Optional description

Quiz

Represents an assessment:

  • id: Primary key
  • chapter_id: Foreign key to Chapter
  • title: Quiz title
  • description: Quiz description
  • date: Scheduled date
  • duration: Duration in minutes

Question

Represents a quiz question:

  • id: Primary key
  • quiz_id: Foreign key to Quiz
  • question_text: The question itself
  • options: JSON string of options
  • correct_answer: Index of correct option

Score

Records a user's quiz attempt:

  • id: Primary key
  • quiz_id: Foreign key to Quiz
  • user_id: Foreign key to User
  • timestamp: When the quiz was taken
  • total_score: Percentage score
  • correct_answers: Number of correct answers
  • total_questions: Total number of questions

UserAnswer

Records individual question responses:

  • id: Primary key
  • score_id: Foreign key to Score
  • question_id: Foreign key to Question
  • user_answer: User's selected option

Security Features

Quiz Master implements several security measures to protect user data and system integrity:

  1. Password Security:

    • Passwords are hashed using Werkzeug's generate_password_hash
    • Passwords are never stored in plaintext
  2. Form Protection:

    • CSRF tokens are required for all forms
    • Input validation prevents malicious data entry
  3. Authorization Controls:

    • Role-based access restrictions
    • Route protection for unauthorized access attempts
    • Session validation for authenticated actions
  4. Database Security:

    • Parameterized queries prevent SQL injection
    • SQLAlchemy ORM provides additional query safeguards
    • Foreign key constraints maintain data integrity
  5. Error Handling:

    • Custom error pages prevent information leakage
    • Controlled exception handling with user-friendly messages

Troubleshooting

Common Issues and Solutions

Login Problems

  • Issue: Unable to login despite correct credentials
  • Solution: Check if cookies are enabled in your browser, clear browser cache

Quiz Submission Failures

  • Issue: Quiz doesn't submit properly
  • Solution: Ensure you have stable internet connection; don't navigate away from the page during quiz

Missing Content

  • Issue: Expected subjects or quizzes not visible
  • Solution: Check if you're logged in with the correct role; admins see all content, students only see published content

Performance Issues

  • Issue: Slow page loads or timeouts
  • Solution: Check your internet connection; try clearing browser cache; server might be under heavy load

Database Connection Errors

  • Issue: "Database connection error" message
  • Solution: Contact system administrator; database might be down or connection parameters incorrect

Error Messages

  • Issue: Encountering a specific error message
  • Solution: Note the error code and message, contact support with these details

Support Resources

For additional support:

  • Check the FAQ section (if implemented)
  • Contact the system administrator
  • Report bugs through the platform's feedback mechanism (if implemented)

About

IIT Madras Mad1 Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published