How kalathi18/automatic-question-paper-generator works
Purpose and Runtime
A PHP/MySQL application for maintaining course question banks and producing randomized examination papers. It is intended to run as a server-rendered website under Apache with XAMPP/WAMP; MySQL schema/data are provisioned from projectdb.sql, and connection settings are centralized in config.php.
Web Entry and Session Boundary
index.php is the likely public landing/authentication entry point, while Main.php serves as the authenticated application hub. logout.php terminates the user session. The application’s security boundary is therefore PHP session/auth state between the initial access flow and management/generation pages.
Paths: index.php, Main.php, logout.php
Persistence Layer
The system persists courses and categorized questions in MySQL. projectdb.sql defines the required database structure, and page-level PHP handlers use the shared database configuration in config.php. There is no separate ORM, API service, or migration framework: request handlers directly form the application and persistence layer.
Paths: config.php, projectdb.sql
Course Management
Course records establish the organizational scope for the question bank and paper-generation workflow. addCourse.php handles course creation, while viewCourses.php exposes existing course data for review and likely selection by downstream question and generation actions.
Paths: addCourse.php, viewCourses.php
Question Bank Management
Questions are entered and categorized through addQuestion.php, then inspected via showQuestions.php. This is the key content-ingestion boundary: generation depends on sufficiently populated, correctly associated course/question records in MySQL.
Paths: addQuestion.php, showQuestions.php
Paper Discovery and Generation
The primary business flow is course/question-bank selection followed by random, non-repeating question selection and paper output. findPaper.php likely supplies the paper/course lookup or selection stage; generatePaper.php executes generation and renders a printable/downloadable paper. Randomization occurs in the PHP/MySQL request path rather than in a dedicated background worker.
Paths: findPaper.php, generatePaper.php
Presentation and Deployment Assets
Pages are server-rendered PHP with shared stylesheet assets. The application is deployed as a conventional Apache document-root project, with no indicated container, queue, cloud service, or separate frontend build/runtime.
Paths: main.css, style2.css, README.md
Main entry points: Main.php Authenticated hub · config.php Database configuration · viewCourses.php View courses · findPaper.php Find paper / select course
Components 13
Server-rendered web app
Apache-hosted PHP pages.
- Landing & authentication · Initial access and session-auth boundary.
index.php - Authenticated hub · Navigation hub for management and generation workflows.
Main.php - Logout · Terminates the user session.
logout.php - Database configuration · Shared MySQL connection settings.
config.php - Shared stylesheets
main.css
Course & question management
- Add course
addCourse.php - View courses · Reviews and selects course records.
viewCourses.php - Add categorized question · Content-ingestion boundary for the question bank.
addQuestion.php - Browse questions
showQuestions.php
Paper generation
- Find paper / select course · Starts paper lookup and course selection.
findPaper.php - Generate randomized paper · Selects non-repeating questions and renders the paper.
generatePaper.php
Other components
- Course & question bank · Stores courses, categorized questions, and paper-source data.
projectdb.sql - Deployment documentation · Documents conventional Apache/XAMPP/WAMP deployment.
README.md
Connections 18
- Landing & authentication → Authenticated hub: authenticated session
- Authenticated hub → Logout: sign out
- Authenticated hub → Add course: manage courses
- Authenticated hub → View courses: review courses
- Authenticated hub → Add categorized question: manage questions
- Authenticated hub → Browse questions: browse question bank
- Authenticated hub → Find paper / select course: find or create paper
- View courses → Add categorized question: course scope
- Find paper / select course → Generate randomized paper: selected course
- Database configuration → Course & question bank: connects to
- Add course → Database configuration: uses
- View courses → Database configuration: uses
- Add categorized question → Database configuration: uses
- Browse questions → Database configuration: uses
- Find paper / select course → Database configuration: uses
- Generate randomized paper → Database configuration: uses
- Database configuration → Course & question bank: course and question data
- Authenticated hub → Shared stylesheets: renders with