Commit 81e5de09236753e596f2f0e4192b3de9e30e1ecd
1 parent
7c6aa90f
Exists in
master
and in
1 other branch
- changed icons in the review.html template
Showing
4 changed files
with
15 additions
and
11 deletions
Show diff stats
BUGS.md
| 1 | 1 | ||
| 2 | # BUGS | 2 | # BUGS |
| 3 | 3 | ||
| 4 | +- Gerar pdf's com todos os testes no final (pdfkit). | ||
| 4 | - permitir eliminar teste a decorrer de modo a que o aluno possa recomeçar (e.g. noutro browser) | 5 | - permitir eliminar teste a decorrer de modo a que o aluno possa recomeçar (e.g. noutro browser) |
| 5 | - servidor nao esta a lidar com eventos scroll/resize. ignorar? | 6 | - servidor nao esta a lidar com eventos scroll/resize. ignorar? |
| 6 | 7 |
serve.py
| @@ -274,7 +274,10 @@ class Root(object): | @@ -274,7 +274,10 @@ class Root(object): | ||
| 274 | fname = self.app.get_json_filename_of_test(test_id) | 274 | fname = self.app.get_json_filename_of_test(test_id) |
| 275 | with open(fname) as f: | 275 | with open(fname) as f: |
| 276 | t = json.load(f) | 276 | t = json.load(f) |
| 277 | - return self.template['review'].render(t=t) | 277 | + r = self.template['review'].render(t=t) |
| 278 | + # import pdfkit | ||
| 279 | + # pdfkit.from_string(r, 'out.pdf') # FIXME fails getting css, images, etc | ||
| 280 | + return r | ||
| 278 | 281 | ||
| 279 | @cherrypy.expose | 282 | @cherrypy.expose |
| 280 | @require(name_is('0')) | 283 | @require(name_is('0')) |
templates/review.html
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <meta charset="utf-8"> | 4 | <meta charset="utf-8"> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | <meta name="viewport" content="width=device-width, initial-scale=1"> | 6 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | - <title> Teste </title> | 7 | + <title>Teste</title> |
| 8 | <link rel="icon" href="/static/favicon.ico"> | 8 | <link rel="icon" href="/static/favicon.ico"> |
| 9 | 9 | ||
| 10 | <!-- MathJax --> | 10 | <!-- MathJax --> |
| @@ -153,11 +153,11 @@ | @@ -153,11 +153,11 @@ | ||
| 153 | 153 | ||
| 154 | % if q['correct'][loop.index] > 0: | 154 | % if q['correct'][loop.index] > 0: |
| 155 | <div class="text-right text-success"> | 155 | <div class="text-right text-success"> |
| 156 | - <i class="fa fa-thumbs-o-up" aria-hidden="true"></i> | 156 | + <i class="fa fa-check" aria-hidden="true"></i> |
| 157 | </div> | 157 | </div> |
| 158 | % else: | 158 | % else: |
| 159 | <div class="text-right text-danger"> | 159 | <div class="text-right text-danger"> |
| 160 | - <i class="fa fa-thumbs-o-down" aria-hidden="true"></i> | 160 | + <i class="fa fa-close" aria-hidden="true"></i> |
| 161 | </div> | 161 | </div> |
| 162 | % endif | 162 | % endif |
| 163 | 163 | ||
| @@ -166,7 +166,7 @@ | @@ -166,7 +166,7 @@ | ||
| 166 | 166 | ||
| 167 | % if q['correct'][loop.index] > 0: | 167 | % if q['correct'][loop.index] > 0: |
| 168 | <div class="text-right text-info"> | 168 | <div class="text-right text-info"> |
| 169 | - <i class="fa fa-hand-o-left" aria-hidden="true"></i> | 169 | + <i class="fa fa-circle" aria-hidden="true"></i> |
| 170 | </div> | 170 | </div> |
| 171 | % endif | 171 | % endif |
| 172 | % endif | 172 | % endif |
| @@ -182,11 +182,11 @@ | @@ -182,11 +182,11 @@ | ||
| 182 | 182 | ||
| 183 | % if q['correct'][loop.index] > 0: | 183 | % if q['correct'][loop.index] > 0: |
| 184 | <div class="text-right text-success"> | 184 | <div class="text-right text-success"> |
| 185 | - <i class="fa fa-thumbs-o-up" aria-hidden="true"></i> | 185 | + <i class="fa fa-check" aria-hidden="true"></i> |
| 186 | </div> | 186 | </div> |
| 187 | % elif q['correct'][loop.index] < 0: | 187 | % elif q['correct'][loop.index] < 0: |
| 188 | <div class="text-right text-danger"> | 188 | <div class="text-right text-danger"> |
| 189 | - <i class="fa fa-thumbs-o-down" aria-hidden="true"></i> | 189 | + <i class="fa fa-close" aria-hidden="true"></i> |
| 190 | </div> | 190 | </div> |
| 191 | % endif | 191 | % endif |
| 192 | 192 | ||
| @@ -195,11 +195,11 @@ | @@ -195,11 +195,11 @@ | ||
| 195 | 195 | ||
| 196 | % if q['correct'][loop.index] > 0: | 196 | % if q['correct'][loop.index] > 0: |
| 197 | <div class="text-right text-danger"> | 197 | <div class="text-right text-danger"> |
| 198 | - <i class="fa fa-thumbs-o-down" aria-hidden="true"></i> | 198 | + <i class="fa fa-close" aria-hidden="true"></i> |
| 199 | </div> | 199 | </div> |
| 200 | % elif q['correct'][loop.index] < 0: | 200 | % elif q['correct'][loop.index] < 0: |
| 201 | <div class="text-right text-success"> | 201 | <div class="text-right text-success"> |
| 202 | - <i class="fa fa-thumbs-o-up" aria-hidden="true"></i> | 202 | + <i class="fa fa-check" aria-hidden="true"></i> |
| 203 | </div> | 203 | </div> |
| 204 | % endif | 204 | % endif |
| 205 | 205 |
templates/test.html
| @@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
| 2 | <html> | 2 | <html> |
| 3 | <head> | 3 | <head> |
| 4 | <meta charset="utf-8"> | 4 | <meta charset="utf-8"> |
| 5 | - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| 6 | - <meta name="viewport" content="width=device-width, initial-scale=1" /> | 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 7 | <title>Teste</title> | 7 | <title>Teste</title> |
| 8 | <link rel="icon" href="/static/favicon.ico"> | 8 | <link rel="icon" href="/static/favicon.ico"> |
| 9 | 9 |