Giter Club home page Giter Club logo

quiztools's Introduction

quiztools

This repo contains tools for automating the creation of a quiz at web sites such as Kahoot, Google forms, JotForm.

The idea is to have large resources of quizzes defined in plain text in ordinary files. A specific quiz can then be quickly made by cut and paste of appropriate text. Software tools in this repo are thereafter used to automatically create a tailored online quiz.

Input syntax

Quizzes are written in DocOnce syntax in ordinary text files, see the DocOnce Quiz Documentation. A minimalistic pure text quiz with a question (Q), three wrong choices (Cw) and one right choice (Cr) is specified as

!bquiz
Q: What is the capital of Norway?
Cw: Helsinki
Cw: Drammen
Cr: Oslo
Cw: Denmark
!equiz

A feature of DocOnce quizzes is the strong support for mathematics and computer code in questions and choices. One can also add explanations why the choices are wrong or right.

Let a file with quizzes as exemplified above have name myquiz.do.txt. This file must first be processed by DocOnce to generate the corresponding DocOnce data structure for quizzes. Any output format in DocOnce can be used for this purpose, e.g.,

doconce format html myquiz.do.txt

Regardless of the chosen output format, the file with the data structure as a Python list of dictionaries is always made: .myquiz.quiz. It typically looks like

[{'choices': [[u'wrong', u'Helsinki']
              [u'wrong', u'Drammen']
              [u'right', u'Oslo'],
              [u'wrong', u'Denmark']],
  'no': 1,
  'question': u'What is the capital of Norway?'},
]

With quiztools, one can read .quiz files with such list of dictionaries objects and automatically create a Kahoot online game.

Running quiztools

Suppose you have username whoever on the Kahoot web site and that the list of dictionaries data structure (as shown above) resides in a file .myquiz.quiz in the current directory. The typical Python code to make a Kahoot quiz is then

import quiztools.KahootQuizMaker
qm = quiztools.KahootQuizMaker.KahootQuizMaker('whoever')
questions = qm.read_quiz_file('.myquiz.quiz')
quiz = qm.make_quiz(questions, title='My First Quiz')
kahoot_id, url = qm.upload_quiz(quiz)
print "Uploaded quiz can be viewed at %s" % url

Instead of this code, one can run a program

quiztools-main.py whoever "My First Quiz" .myquiz.quiz

Go to the URL that is printed to see the online quiz!

Note:

  • The input to quiztools is a .quiz file (with a data structure holding the quizzes) and not a text file in DocOnce format. You must run doconce format on the latter to produce the .quiz file (or you can make .quiz files manually once you know the syntax).

Supported web sites for quizzes

Some experiments have been done with JotForm too, but so far, Kahoot is the only site we strongly recommend. Kahoot has made sufficient extensions such that mathematics and computer code can be rendered satisfactorily.

Installation of quiztools

Clone or fork this repository, go to quiztools, and run setup.py the standard way

git clone https://github.com/hplgit/quiztools.git
cd quiztools
sudo python setup.py install

Installation of DocOnce

DocOnce has functionality for translating compact quiz definitions in ascii files, as outlined above, to data structures that can be uploaded by quiztools. DocOnce is a quite comprehensive piece of software that depends on a large number of packages and hence a substantial software infrastructure. However, to use quiztools you only need a plain DocOnce installation without the software's many dependencies. Everything you need is installed by this command:

sudo pip install -e git+https://github.com/hplgit/doconce#egg=doconce --upgrade

You need the pip program and a Python version 2.7 installation.

Examples

See demo-quiz/pyquiz.do.txt and demo-quiz/sample_quiz.do.txt for quiz examples. The .html files in demo-quiz can be loaded into a browser to display the quizzes.

Status

The quiztools project is still in testing phase. Massive online Kahoot quiz competitions with big audiences have not been run yet.

Authors

The quiztools software was written and tested by

under the supervision of

quiztools's People

Contributors

hplgit avatar johanhake avatar jvbrink 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.