All Projects → matt-d-webb → javascript-quiz-using-json

matt-d-webb / javascript-quiz-using-json

Licence: MIT License
A jquery quiz for scoring multiple choice questions

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Labels

Projects that are alternatives of or similar to javascript-quiz-using-json

sakubun
A tool that helps you improve your Japanese vocabulary and kanji skills with practice that's customized to your needs.
Stars: ✭ 20 (+25%)
Mutual labels:  quiz
TheJSQuiz
Test your JavaScript skills with this interactive quiz!
Stars: ✭ 33 (+106.25%)
Mutual labels:  quiz
quiz-host-app
Multiplayer quiz app built on Salesforce technology (host app)
Stars: ✭ 69 (+331.25%)
Mutual labels:  quiz
discord-music-quizzer
Discord music quiz bot
Stars: ✭ 18 (+12.5%)
Mutual labels:  quiz
react-quiz-app
A Simple React Quiz App 💎
Stars: ✭ 37 (+131.25%)
Mutual labels:  quiz
django-schools
Django Quiz Application
Stars: ✭ 55 (+243.75%)
Mutual labels:  quiz
quizquickanswer-telegram-game-bot
🎮 Funny quiz game for telegram, play with friends on your group!
Stars: ✭ 15 (-6.25%)
Mutual labels:  quiz
KanaQuiz
A simple app to quiz the user on identifying Japanese characters.
Stars: ✭ 19 (+18.75%)
Mutual labels:  quiz
basic-lms-laravel
Basic Laravel Learning Management System
Stars: ✭ 54 (+237.5%)
Mutual labels:  quiz
hugo-quiz
A custom hugo shortcode for interactive quizzes
Stars: ✭ 25 (+56.25%)
Mutual labels:  quiz
QuizKit
⁉️ A framework for developing local or remote quiz apps for iOS or tvOS
Stars: ✭ 28 (+75%)
Mutual labels:  quiz
hp-quiz
Harry Potter movies quiz. Experimenting with localStorage, SVG path animations and vue.observable
Stars: ✭ 42 (+162.5%)
Mutual labels:  quiz
Ritsu
A Discord Bot based on the AnimeMusicQuiz (AMQ) game, play using your MAL/Anilist animelist and with different game modes! ✨
Stars: ✭ 24 (+50%)
Mutual labels:  quiz
MLH-Quizzet
This is a smart Quiz Generator that generates a dynamic quiz from any uploaded text/PDF document using NLP. This can be used for self-analysis, question paper generation, and evaluation, thus reducing human effort.
Stars: ✭ 23 (+43.75%)
Mutual labels:  quiz
Questions
A modular iOS quiz app
Stars: ✭ 108 (+575%)
Mutual labels:  quiz
Quizoo
Online Quiz Platform for conducting quizes
Stars: ✭ 27 (+68.75%)
Mutual labels:  quiz
Quizzie
Open Sourced Quiz Portal which can be used for any event / competition with a custom leaderboard.
Stars: ✭ 31 (+93.75%)
Mutual labels:  quiz
Google-Data-Analytics-Professional-Certificate
Quizzes & Assignment Solutions for Google Data Analytics Professional Certificate on Coursera. Also included a few resources on side that I found helpful.
Stars: ✭ 19 (+18.75%)
Mutual labels:  quiz
playhouse
A platform for real-time multiplayer trivia games 🎮
Stars: ✭ 20 (+25%)
Mutual labels:  quiz
edX-6.00.2x-Introduction-to-Computational-Thinking-and-Data-Science
MIT edX 6.00.2x Introduction to Computational Thinking and Data Science problem sets code
Stars: ✭ 62 (+287.5%)
Mutual labels:  quiz

Javascript quiz using JSON

Code Climate Build Status codecov devDependencies Status

This simple project provides a clean API for rendering quiz questions with multiple choice answers. The data is supplied using valid JSON and can be retrieved from any url end point which returns the data in the desirable format (see sample data).

Each question is assigned a score, this allows for a range of scores for each question or a specific answer.

###v0.5.1-Alpha

This project is currently in ALPHA and activity being worked on. Contributions are welcome!

Via NPM

npm i javascript-quiz-using-json

How to use:

Add the following HTML into your page:

HTML

<!-- dom reference -->
<div id="quizName"></div>

<!-- quiz package -->
<script src="./javascript-quiz-using-json/dist/quiz.umd.min.js"></script>

JAVASCRIPT

Basic initialisation.

Quiz.init({ id: "quizName" });  

Note: this needs to be done after referencing the script shown above.

Sample JSON

Here is a sample of the quiz question data:

  {
      "question": "What year was the film The Terminator released?",
      "info": "The Terminator is a 1984 American science fiction action film directed by James Cameron. It stars Arnold Schwarzenegger as the Terminator, a cyborg assassin sent back in time from 2029 to 1984 to kill Sarah Connor (Linda Hamilton), whose son will one day become a savior against machines in a post-apocalyptic future.",
      "options":
        [
          "1982",
          "1983",
          "1984",
          "1984"
        ],
      "scores":
        [0,3,1,2]
  }

CONFIGURATIONS

var configurations = {
  id: 'quizName',                  // the element reference within the DOM
  dataSource: './data.json',       // the json quiz data location
  randomise: 'false',              // randomise the order of the questions to the user
  loadingGif: './img/loading.gif', // loading image between rendering
};

Quiz.init(configurations);

HOW TO INSTALL

Pull the package from npm:

$ npm i javascript-quiz-using-json --save

Install dev dependancies:

$ npm install

Build the package:

$ npm run build

This will generate the files in the the dist folder, i.e. dist/quiz.umd.min.js

CONTRIBUTING

$ git clone

$ npm install

$ npm test

$ npm start

TO DO

  • Add optional style sheets / using material design / bootstrap
  • Add charts to result rendering
  • Add Automated Acceptance Tests
  • Set up semvar
  • Abstract the rendered html question into templates for better customisation
  • Add as npm package
  • Add webpack bundler
  • Remove jquery dependency
  • Move TODOs to issues with need-help flag
  • Update Travis Build
  • Add module bundler
  • Add test coverage badge
  • Refactor json data for better clarity e.g "answers" should be "options" etc.
  • Configurate as bower package
  • Remove Bower, Switch to npm
  • Add Unit Tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].