Giter VIP home page Giter VIP logo

pblive's Introduction

PBLive

PBLive is an open-source self-hosted live online quiz tool, similar to Kahoot and Socrative.

This repository was forked from https://yingtongli.me/git/PBLive/

Installing and running

virtualenv venv
. venv/bin/activate
pip install -r requirements.txt
export QUIZ_SERVER_URL="http://localhost:5000"
python -m pblive

Navigate to http://1.2.3.4:5000/admin to begin.

Example

Place in data/example.yaml, where the data directory is a sibling of this README:

title: Example quiz
questions:
- type: landing
- type: mcq
  prompt: This is a multiple-choice question
  answers: [A, B, C, D]
- type: type
  prompt: This is a basic short answer question
- type: type
  prompt: The answer to this short answer question is a percentage
  answer_form: $1%
  answer_type: number
  answer_range: [0, 100]
- type: draw
  prompt: Draw on the diagram
  image: some_image.gif
- type: speed
  prompt: A speed quiz is like multiple-choice, but starts a two second countdown once the first answer is submitted to each question.
  answers: [Option 1, Option 2, Option 3]
- type: speed
  prompt: This will automatically continue until the last speed question in a row is completed.
  answers: [Option 1, Option 2, Option 3]
- type: speed
  prompt: The answers to the speed questions are reviewed in a review stage following the final question.
  answers: [Option 1, Option 2, Option 3]
- type: speed_review

Files like some_image.gif should be placed within the img subfolder of data.

Docker

Example

# build
docker build -t pblive .

docker run --rm -v `pwd`/example.yaml:/pblive/data/example.yaml -e "QUIZ_SERVER_URL=http://localhost:5000"  -p 5000:5000 pblive

Security

There is none. Watch this space.

Licence

Copyright © 2017  RunasSudo (Yingtong Li)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

pblive's People

Contributors

dependabot[bot] avatar williamjacksn avatar runassudo avatar pkoltermann avatar

Stargazers

 avatar  avatar William Humberto Herrera Rey avatar Leopoldo Pla Sempere avatar Bartmoss avatar  avatar  avatar IronTooch avatar Daniel Fuchs avatar  avatar Garvan Doyle avatar  avatar Dennis Bakhuis avatar  avatar Suri avatar

Watchers

 avatar James Cloos avatar  avatar

pblive's Issues

Cannot install

I tried to install it on a Ubuntu 20 VPS. On running the last command python -m pblive I got this error message

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/USER/pblive/pblive/__main__.py", line 46, in <module>
    for f in os.listdir('data'):
FileNotFoundError: [Errno 2] No such file or directory: 'data'

When trying the docker example I got these errors:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/pblive/pblive/__main__.py", line 49, in <module>
    with open(os.path.join('data', f)) as fh:
IsADirectoryError: [Errno 21] Is a directory: 'data/example.yaml'

I am no sysadmin, just learning...

Works fine locally, stuck saying please wait loading when reverse proxied.

Hi! First of all thank you for setting this up in docker. Does almost everything I need!

I'm trying to serve this publicly behind a reverse proxy. I can navigate to the page and choose a quiz. But instead of giving me the colour selection screen it just gives me a please wait loading message.

Any ideas? Thanks!

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.