Git Product home page Git Product logo

open_quiz's Introduction

User Generated Quiz

Purpose

Functional quiz web application to ask multiple choice questions about anything!

Build With

  • HTML
  • CSS FlexBox
  • JavaScript
  • jQuery
  • jQuery UI

Website

https://primalorb.github.io/open_quiz/

Resources Referenced / Used

Application Flow

  • Settings / Question Setup

    • Add new question button with modal popup to define new questions/answer objects.
      • The first answer entry is the "true" value
      • Add additional wrong answers by pressing the add button
    • Questions are displayed in a list, and can be individually deleted
    • Time settings are individually controlled. Just click on the field to make it editable, and then click out to update the value
  • Start Quiz

    • Question page is loaded
      • Shuffle question array order
      • Iterate through questions (i++) until all questions are asked
        • Shuffle order of answers to display on page
          • Correct answer
            • displays "correct"
            • iterates to next question
          • Incorrect answer
            • penalizes the time counter
            • graphic of penalty generated and animated
            • display "wrong"
            • iterates to next question
    • Timer Starts
  • End Quiz

    • Whichever occurs first
      • All questions are answered
        • Score is time remaining on the timer
      • Timer is run to zero (or below if due to penalty)
        • Score is the timer value ( can be negative due to penalties )
        • Additional negative score is factored by the number of questions not answers yet (penalty for each)
  • Submit Score

    • Different text generated based on end quiz conditions ( remaining question / all completed questions )
    • Enter initials (or name, I do not have a limit on max length)
    • Initials are validated by requiring at least some sort of input
    • Object created of timestamp, initials, and score
    • Object pushed to array of scores on localStorage
  • High Score Page

    • Array of scores pulled from localStorage
    • Array sorted to be score descending ( highest score first )
    • Page displays the scores (no limit) and decodes the timestamp into a date/time record
    • Go back button will return to the start quiz page
    • Clear high scores button
      • Removes array from localStorage
      • empties the current array in use
  • Leaving active quiz

    • If clicking high score list while in active quiz
      • time is "paused" by iterating timer++ to offset the timer-- of the regular interval
      • user is asked to confirm they want to abort the quiz
        • if yes, timer interval is cleared, value set to zero, and proceed to high score page
        • if no, timer is resumed and the quiz continues as is

open_quiz's People

Contributors

primalorb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.