Coder Social home page Coder Social logo

aquiz's Introduction

AQuiz

AQuiz is a simple JavaScript library for small tests or quizzes.

It is intended for integration with server-side test generator such as EGE but can also be used locally with hand-prepared test files.

Dependencies

Installation

  1. Clone the repository.
  2. Put dependencies into the same directory (or modify links in quiz.xhtml).
  3. Copy config.sample.js to config.js, modify as required.
  4. (Optionally) configure your browser to allow local file access.

To test, run firefox quiz.xhtml?url=test.quiz

Integration

Configuration file config.js must define quiz_init function which should initialize a Quiz object passed to it. Simplest way to do that is by calling load function with some URL pointing to server-side automated testing system. You can also call setQuestionsJSON directly.

If configuration also defines quiz_submit_url function, Submit button will be displayed in the UI. Pressing this button will generate a POST request to the URL returned by quiz_submit_url. The request will contain a single JSON array parameter answers. Each array element will be either student's answer to a quiz question or null if the question was not answered.

Features

  • Single choice questions (pick a single correct answer)
  • Multiple choice questions (pick all correct answers)
  • Direct input questions (enter answer as number/word)
  • Ordering questions (arrange options in connect order)
  • Matching questions (match entities into categories)
  • Optional built-in self-check

Quiz format

A quiz is a JSON file containing an array of questions. Each question is an object with the following keys:

  • "type": question type, must be one of "sc", "mc", "di", "sr", "mt", "cn";
  • "text": question text;
  • "variants": answer options/choices;
  • "answer": optional answer given by student;
  • "correct": optional correct answer.
  • "langs": optional list of available programming languages.

##License

GPL v2

aquiz's People

Contributors

klenin avatar nzem avatar pinkslot avatar

Watchers

James Cloos avatar  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.