Name Last Update
config Loading commit data...
demo Loading commit data...
logs Loading commit data...
static Loading commit data...
templates Loading commit data...
.gitignore Loading commit data...
BUGS.md Loading commit data...
MANUAL.md Loading commit data...
README.md Loading commit data...
app.py Loading commit data...
initdb.py Loading commit data...
models.py Loading commit data...
questions.py Loading commit data...
serve.py Loading commit data...
test.py Loading commit data...
tools.py Loading commit data...

README.md

README

Requirements:

The webserver is a python 3.5+ application.

Requires the following python packages, which can be installed using pip:

  • CherryPy (>=3.7.0)
  • Mako (>=1.0.1)
  • Markdown (>=2.6.2)
  • PyYAML (>=3.11)
  • bcrypt (>=2.0.0)

System setup:

Open a terminal and navigate to a directory where this software is to be installed, e.g. /var/www or /home/username. Run the following commands:


cd WHERE/TO/PUT/THE/SOFTWARE

# get software using git
git clone https://USER@bitbucket.org/USER/perguntations.git
cd perguntations

# create database (if no csv file is provided, a database with 5 fake students is created for debugging)
./initdb.py CSV_FILE_HERE
mv students.db SOMEWHERE

# update test configuration with the correct database file.
vi demo/test.yaml
# Edit line 7 to something like
# database: SOMEWHERE/students.db

# edit server configuration if needed
vi config/server.conf

# get help
./serve.py --help 

# run demo test
./serve.py demo/test.yaml

# open browser at http://127.0.0.1:8080/
# the professor/administrator is number 0

# ^C to terminate the server

Troubleshooting

  • If you are getting any UnicodeEncodeError type of errors that's because the terminal is not supporting UTF-8. Try running locale on the terminal and see if there is any error messages. Solutions:
    • debian: fix it with sudo dpkg-reconfigure locales, select your UTF-8 locales and try again.

Contribute

  • Writing questions in yaml format
  • Testing and reporting bugs
  • Code review
  • New features and ideas

Contacts