Skip to content

❤️ An open-source, browser-based quiz with configurable settings via one HTML file. Supports single/multiple-choice questions, dark/light mode, randomized questions & answers, instant mistake feedback, percentage scoring, and mobile scalability. Includes a tool to convert human-readable questions to JSON

License

Notifications You must be signed in to change notification settings

Refloow/Exam-Quiz-Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Exam-Quiz-Test Platform

A lightweight, browser-based quiz platform that allows users to create and customize tests by simply editing one HTML file. It includes a tool to convert human-readable questions into JSON format for easy integration. The application is fully open-source under the MIT license.

image

Features

Customizable Questions & Timer

  • Edit a single HTML file to set the dataset of questions and test duration.

Single & Multiple Choice Questions

  • Supports both single-choice and multi-choice question formats.

Dark Mode & Light Mode

  • Fully responsive UI with automatic or manual theme switching.

Randomized Question & Answer Order

  • The order of questions and answer choices is randomized for each run.

Instant Feedback on Mistakes

  • If an incorrect answer is selected, the correct answer is immediately revealed.

Accurate Scoring System

  • Single-choice questions: 100% or 0% per question.
  • Multiple-choice questions:
    • Correct partial selections get partial percentage.
    • Any wrong selection results in 0% for that question.

Total Score Calculation

  • At the end of the test, a percentage-based total score is displayed.

Mobile-Friendly UI

  • The interface is fully scalable and works on both desktop & mobile devices.

No Installation Required

  • The quiz runs directly in the browser—no backend or server required.

Separate Question Converter Tool

  • Convert human-readable question formats into JSON format for easy integration.

Usage Instructions

1️⃣ Editing Questions & Timer

Modify the provided HTML file to:

  • Set the total quiz time.

  • Input your questions and answers.

    /******************************************************
       * 1) CONFIGURATION & QUESTION DATA (inlined)
    ******************************************************/
      const config = {
        // total time in seconds
        totalTime: 90,
        // how many questions to pick
        questionsToPick: 5
      };
    

2️⃣ Question Format (Human-Readable)

1. Choose the right answer to 2+2
• 1
• 2
• 4 *
• 5
2. What of the following are fruits?
• apple *
• banana *
• melon *
• cucumber

3️⃣ JSON Converted Format

    const questionPool = [
      {
        question: "Driving in ______ weather is dangerous due to lack of visibility.",
        options: ["freezing", "foggy", "shiny", "rainy"],
        correctAnswers: [1],
        type: "single"
      },
      {
        question: "Which of the following are fruit?",
        options: ["Carrot", "Apple", "Broccoli", "Strawberry", "Lemon"],
        correctAnswers: [1, 3, 4],
        type: "multiple"
      },
      {
        question: "2 + 2 = ?",
        options: ["3", "4", "5", "6"],
        correctAnswers: [1],
        type: "single"
      },
      {
        question: "Select all prime numbers:",
        options: ["2", "3", "4", "8", "11"],
        correctAnswers: [0, 1, 4],
        type: "multiple"
      },
      {
        question: "What color is the sky on a clear day?",
        options: ["Blue", "Green", "Yellow", "Red"],
        correctAnswers: [0],
        type: "single"
      },
      // add more questions if you want ...
    ];

4️⃣ Running the Quiz

Simply open the HTML file in any modern web browser. The quiz will start immediately.

5️⃣ Using the Question Converter Tool

Navigate to the Question Converter Page, paste the human-readable format, and generate JSON to integrate into the quiz.

image


Installation (Optional for Local Development)

  1. Clone the repository:
    git clone https://github.com/Refloow/Exam-Quiz-Test.git
  2. Open index.html in your browser.

License

This project is open-source under the MIT License. Feel free to use, modify, and distribute it!

Contributing

We welcome contributions! Feel free to submit pull requests or report issues.

Enjoy building your quizzes! 🚀

About

❤️ An open-source, browser-based quiz with configurable settings via one HTML file. Supports single/multiple-choice questions, dark/light mode, randomized questions & answers, instant mistake feedback, percentage scoring, and mobile scalability. Includes a tool to convert human-readable questions to JSON

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages