Commit bcf1d9ebbc359107926e0b3a60fe1966f813042e

Authored by Miguel Barão
1 parent 08a26dd3
Exists in master and in 1 other branch dev

- cleanup for inclusion in master branch

BUGS.md
1 1  
2 2 BUGS:
3 3  
  4 +- servidor http com redirect para https.
4 5 - servir imagens/ficheiros.
5 6 - topicos virtuais nao deveriam aparecer. na construção da árvore os sucessores seriam ligados directamente aos predecessores.
6 7  
... ...
config/logger-debug.yaml
... ... @@ -19,22 +19,22 @@ loggers:
19 19 handlers: ['default']
20 20 level: 'DEBUG'
21 21  
22   - 'app':
  22 + 'factory':
23 23 handlers: ['default']
24 24 level: 'DEBUG'
25 25 propagate: False
26 26  
27   - 'learnapp':
  27 + 'knowledge':
28 28 handlers: ['default']
29 29 level: 'DEBUG'
30 30 propagate: False
31 31  
32   - 'questions':
  32 + 'learnapp':
33 33 handlers: ['default']
34 34 level: 'DEBUG'
35 35 propagate: False
36 36  
37   - 'questionfactory':
  37 + 'questions':
38 38 handlers: ['default']
39 39 level: 'DEBUG'
40 40 propagate: False
... ... @@ -43,14 +43,3 @@ loggers:
43 43 handlers: ['default']
44 44 level: 'DEBUG'
45 45 propagate: False
46   -
47   - 'knowledge':
48   - handlers: ['default']
49   - level: 'DEBUG'
50   - propagate: False
51   -
52   - # 'root':
53   - # handlers: ['default']
54   - # level: 'DEBUG'
55   - # propagate: False
56   - #
57 46 \ No newline at end of file
... ...
serve.py
... ... @@ -3,19 +3,16 @@
3 3 # python standard library
4 4 from os import path
5 5 import sys
6   -import json
7 6 import base64
8 7 import uuid
9   -import concurrent.futures
10 8 import logging.config
11 9 import argparse
12 10  
13 11 # user installed libraries
14   -import markdown
15 12 import tornado.ioloop
16 13 import tornado.web
17 14 import tornado.httpserver
18   -from tornado import template, gen
  15 +from tornado import template #, gen
19 16  
20 17 # this project
21 18 from learnapp import LearnApp
... ... @@ -34,7 +31,7 @@ class WebApplication(tornado.web.Application):
34 31 (r'/question', QuestionHandler), # each question
35 32 (r'/topic/(.+)', TopicHandler), # page for doing a topic
36 33 (r'/', RootHandler), # show list of topics
37   - # (r'/file/(.+)', FileHandler),
  34 + # (r'/file/(.+)', FileHandler), # FIXME
38 35 ]
39 36 settings = {
40 37 'template_path': path.join(path.dirname(__file__), 'templates'),
... ... @@ -199,9 +196,8 @@ class QuestionHandler(BaseHandler):
199 196 def finished_topic(self, user): # FIXME user unused
200 197 return {
201 198 'method': 'finished_topic',
202   - 'params': {
203   - 'question': f'<img src="/static/trophy.png" alt="trophy" class="img-fluid mx-auto d-block" width="30%">',
204   - # 'progress': 1.0,
  199 + 'params': { # FIXME no html here please!
  200 + 'question': f'<img src="/static/trophy.png" alt="trophy" class="img-fluid mx-auto d-block" width="30%">'
205 201 }
206 202 }
207 203  
... ...
templates/login.html
1 1 <!DOCTYPE html>
2 2 <html lang="en">
3 3 <head>
4   - <title>GotIT</title>
  4 + <title>iLearn</title>
5 5 <link rel="icon" href="/static/favicon.ico">
6 6  
7 7 <meta charset="utf-8">
... ...
templates/maintopics.html
... ... @@ -3,7 +3,7 @@
3 3 <!DOCTYPE html>
4 4 <html lang="pt-PT">
5 5 <head>
6   - <title>DoIT</title>
  6 + <title>iLearn</title>
7 7 <link rel="icon" href="/static/favicon.ico">
8 8  
9 9 <meta charset="utf-8">
... ...
templates/question.html
1 1 {% autoescape %}
2 2  
3   -<h1 class="page-header">{{ question['title'] }}</h1>
  3 +<h4 class="page-header">{{ question['title'] }}</h4>
4 4  
5 5 <div id="text">
6 6 {{ md(question['text']) }}
... ...
templates/topic.html
1 1 <!DOCTYPE html>
2 2 <html>
3 3 <head>
4   - <title>GotIT</title>
  4 + <title>iLearn</title>
5 5 <link rel="icon" href="/static/favicon.ico">
6 6  
7 7 <meta charset="utf-8">
... ...