diff --git a/BUGS.md b/BUGS.md index 182ba85..5f8c72a 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,6 +1,11 @@ # BUGS +- se submissão falhar (aluno desconectado da rede) nao pode sair da página para nao perder o teste. possiveis solucoes: + - botao submeter valida se esta online com um post willing_to_submit, se estiver online, mostra mensagem de confirmacao, caso contrario avisa que nao esta online. + - periodicamente, cada user faz um post keep-alive. warning nos logs se offline. + - Cada pergunta respondida é logo submetida. + - ctrl-c should ask for confirmation before exiting. - eventos unfocus? - servidor nao esta a lidar com eventos scroll/resize. ignorar? diff --git a/README.md b/README.md index d1e1448..ccd4db5 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,8 @@ The webserver is a python application and requires `python3.6` and `pip` to be installed, plus the following additional packages: -- ~~CherryPy~~ -- ~~Mako~~ - tornado -- Markdown +- mistune - PyYAML - Pygments - SQLAlchemy @@ -24,30 +22,40 @@ These can be installed for a single user (recommended), in a python virtual envi #### Installing packages for a single user (recommended) ```.bash -pip3 install --user tornado markdown pyyaml pygments sqlalchemy bcrypt +pip3 install --user tornado mistune pyyaml pygments sqlalchemy bcrypt ``` #### Installing packages in a virtual environment (alternative) -```.bash +```bash pyvenv-3.6 venv/perguntations # or other virtualenv directory source venv/perguntations/bin/activate # activate virtualenv -pip3 install tornado markdown pyyaml pygments sqlalchemy bcrypt +pip3 install tornado mistune pyyaml pygments sqlalchemy bcrypt ``` #### Installing packages system wide (alternative) I personally prefer python packages to be installed for a single user, but if a system wide installation is required, it is probably better to use the operating system package manager instead of `pip`: -- Linux: apt-get, etc -- macOS: macports, etc +Linux: + +```bash +apt-get install py36-tornado py36-mistune? py36-yaml py36-pygments... +``` + +macOS macports: + +```bash +port install py36-py36-tornado py36-mistune? py36-yaml py36-pygments... +``` + ### Install and setup perguntations There is no installer, pip or otherwise. It's still in development and has to be run from sources. Use `git` to get the sources: -```.bash +```bash cd WHERE/TO/PUT/THE/SOFTWARE git clone https://USERNAME@bitbucket.org/USERNAME/perguntations.git ``` @@ -69,9 +77,10 @@ Copy certificates `cert.crt` and `cert.key` to the `perguntations/certs/` direct Self-signed certificates are not certified by a recognised authority and browsers will complain that the certificate is not trusted. -TODO: explain... - -Copy certificates `cert.crt` and `cert.key` to the `perguntations/certs/` directory. +```bash +cd perguntations/certs/ +openssl req -x509 -newkey rsa:4096 -keyout cert.key -out cert.crt -days -nodes +``` ## Running a demo @@ -92,14 +101,14 @@ mv students.db demo/ mkdir demo/ans # edit test configuration and check if everything looks right -vi demo/test.yaml +vi demo/test-tutorial.yaml ``` We are now ready to run the server: ```.bash -./serve.py --help # get help -./serve.py demo/test.yaml # run demo test +./serve.py --help # get help +./serve.py demo/test-tutorial.yaml # run demo test ``` By default the server listens on port 8443 and on all IPs of all network interfaces. -- libgit2 0.21.2