From 81e5de09236753e596f2f0e4192b3de9e30e1ecd Mon Sep 17 00:00:00 2001 From: Miguel Barão Date: Thu, 19 Jan 2017 12:37:57 +0000 Subject: [PATCH] - changed icons in the review.html template --- BUGS.md | 1 + serve.py | 5 ++++- templates/review.html | 16 ++++++++-------- templates/test.html | 4 ++-- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/BUGS.md b/BUGS.md index 81390e3..0b61ed1 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,6 +1,7 @@ # BUGS +- Gerar pdf's com todos os testes no final (pdfkit). - permitir eliminar teste a decorrer de modo a que o aluno possa recomeçar (e.g. noutro browser) - servidor nao esta a lidar com eventos scroll/resize. ignorar? diff --git a/serve.py b/serve.py index 3ea09e3..7d2a3fc 100755 --- a/serve.py +++ b/serve.py @@ -274,7 +274,10 @@ class Root(object): fname = self.app.get_json_filename_of_test(test_id) with open(fname) as f: t = json.load(f) - return self.template['review'].render(t=t) + r = self.template['review'].render(t=t) + # import pdfkit + # pdfkit.from_string(r, 'out.pdf') # FIXME fails getting css, images, etc + return r @cherrypy.expose @require(name_is('0')) diff --git a/templates/review.html b/templates/review.html index 0a27220..949898b 100644 --- a/templates/review.html +++ b/templates/review.html @@ -4,7 +4,7 @@ - Teste + Teste @@ -153,11 +153,11 @@ % if q['correct'][loop.index] > 0:
- +
% else:
- +
% endif @@ -166,7 +166,7 @@ % if q['correct'][loop.index] > 0:
- +
% endif % endif @@ -182,11 +182,11 @@ % if q['correct'][loop.index] > 0:
- +
% elif q['correct'][loop.index] < 0:
- +
% endif @@ -195,11 +195,11 @@ % if q['correct'][loop.index] > 0:
- +
% elif q['correct'][loop.index] < 0:
- +
% endif diff --git a/templates/test.html b/templates/test.html index d6b9a71..96f0208 100644 --- a/templates/test.html +++ b/templates/test.html @@ -2,8 +2,8 @@ - - + + Teste -- libgit2 0.21.2