- Introduction
- Target Users
- System Architecture
- Features Overview
- User Guides
- Technical Implementation
- Installation and Setup
- Database Schema
- Security Features
- Troubleshooting
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.
- 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
- 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
- School/College Students: Take assigned quizzes and track progress
- Professional Learners: Self-assess knowledge in specific domains
- Certification Candidates: Practice for certification exams
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
- Dashboard: Overview of platform usage and statistics
- Subject Management: Create, edit, and delete subjects
- Chapter Management: Organize content within subjects
- Quiz Management: Create timed quizzes with customizable settings
- Question Bank: Create multiple-choice questions with correct answers
- User Management: Monitor and manage user accounts
- Analytics: View platform-wide performance metrics and trends
- Dashboard: Personal statistics and upcoming quizzes
- Quiz Catalog: Browse available quizzes by subject or chapter
- Quiz Taking: Take quizzes with timer and progress tracking
- Results View: Detailed feedback after quiz completion
- Performance History: Track progress over time across subjects
-
Access the Admin Dashboard:
- Login with your admin credentials
- You'll be automatically redirected to the admin dashboard
-
Managing Subjects:
- Navigate to "Manage Subjects" from the dashboard
- Create new subjects with descriptive names and details
- Edit or delete existing subjects as needed
-
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
-
Creating Quizzes:
- Select "Manage Quizzes" to create new assessments
- Set parameters like duration, date, and associated chapter
- Provide clear descriptions to guide students
-
Adding Questions:
- From a quiz page, select "Manage Questions"
- Create multiple-choice questions with four options
- Designate the correct answer among the choices
-
User Management:
- Access "Manage Users" to view all registered students
- Review individual performance metrics
- Delete users when necessary (with confirmation)
-
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
- 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
-
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
-
Student Dashboard:
- View your performance statistics
- See upcoming and recent quizzes
- Access quick navigation to subjects
-
Finding Quizzes:
- Browse the quiz catalog from "Available Quizzes"
- Filter by subject or search by keywords
- View quiz details before starting
-
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
-
Reviewing Results:
- After submission, view your performance summary
- Review correct and incorrect answers
- See explanations where provided
-
Tracking Progress:
- Visit "Quiz History" to see all completed quizzes
- Monitor performance trends over time
- Identify strength and improvement areas
- 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
The Quiz Master platform was implemented through a systematic development process:
- Established Flask application structure
- Configured PostgreSQL database connection
- Set up essential extensions (Flask-Login, Flask-WTF, Flask-SQLAlchemy)
- Created base templates and styling framework
- Designed relational database schema
- Created SQLAlchemy models for all entities
- Implemented relationships and constraints
- Set up cascading deletion for related records
- 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
- 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
- Designed intuitive quiz-taking interface
- Implemented timer functionality with auto-submission
- Created detailed results view with correct/incorrect indicators
- Built performance history tracking
- 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
- Implemented database query optimization
- Added CSRF protection on all forms
- Created input validation and sanitization
- Added proper error handling and user feedback
- Performed functionality testing across user roles
- Conducted responsive design testing
- Fixed bugs and edge cases
- Enhanced user experience based on testing feedback
Follow these steps to set up Quiz Master on your server:
- Python 3.7+ installed
- PostgreSQL database server
- pip (Python package manager)
-
Clone the repository:
git clone <repository-url> cd quiz-master
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create a
.env
file with the following variables:DATABASE_URL=postgresql://username:password@localhost:5432/quizmaster SESSION_SECRET=your_secret_key
-
Initialize the database:
python init_db.py
-
Start the application:
gunicorn --bind 0.0.0.0:5000 main:app
-
Access the application: Open a browser and navigate to
http://localhost:5000
During initialization, a default admin account is created:
- Username:
admin
- Password:
admin123
Important: Change the default password immediately after first login.
The application uses the following database models:
Stores user account information:
id
: Primary keyusername
: Unique usernamepassword_hash
: Securely hashed passwordfull_name
: User's full namequalification
: Optional qualification informationdob
: Date of birthis_admin
: Boolean flag for role designation
Represents a knowledge area:
id
: Primary keyname
: Subject namedescription
: Optional description
Represents a subdivision of a subject:
id
: Primary keysubject_id
: Foreign key to Subjectname
: Chapter namedescription
: Optional description
Represents an assessment:
id
: Primary keychapter_id
: Foreign key to Chaptertitle
: Quiz titledescription
: Quiz descriptiondate
: Scheduled dateduration
: Duration in minutes
Represents a quiz question:
id
: Primary keyquiz_id
: Foreign key to Quizquestion_text
: The question itselfoptions
: JSON string of optionscorrect_answer
: Index of correct option
Records a user's quiz attempt:
id
: Primary keyquiz_id
: Foreign key to Quizuser_id
: Foreign key to Usertimestamp
: When the quiz was takentotal_score
: Percentage scorecorrect_answers
: Number of correct answerstotal_questions
: Total number of questions
Records individual question responses:
id
: Primary keyscore_id
: Foreign key to Scorequestion_id
: Foreign key to Questionuser_answer
: User's selected option
Quiz Master implements several security measures to protect user data and system integrity:
-
Password Security:
- Passwords are hashed using Werkzeug's generate_password_hash
- Passwords are never stored in plaintext
-
Form Protection:
- CSRF tokens are required for all forms
- Input validation prevents malicious data entry
-
Authorization Controls:
- Role-based access restrictions
- Route protection for unauthorized access attempts
- Session validation for authenticated actions
-
Database Security:
- Parameterized queries prevent SQL injection
- SQLAlchemy ORM provides additional query safeguards
- Foreign key constraints maintain data integrity
-
Error Handling:
- Custom error pages prevent information leakage
- Controlled exception handling with user-friendly messages
- Issue: Unable to login despite correct credentials
- Solution: Check if cookies are enabled in your browser, clear browser cache
- Issue: Quiz doesn't submit properly
- Solution: Ensure you have stable internet connection; don't navigate away from the page during quiz
- 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
- Issue: Slow page loads or timeouts
- Solution: Check your internet connection; try clearing browser cache; server might be under heavy load
- Issue: "Database connection error" message
- Solution: Contact system administrator; database might be down or connection parameters incorrect
- Issue: Encountering a specific error message
- Solution: Note the error code and message, contact support with these details
For additional support:
- Check the FAQ section (if implemented)
- Contact the system administrator
- Report bugs through the platform's feedback mechanism (if implemented)