Commit bbbaec78497fb4c5864364bfee7c8d189f0e7a6d
1 parent
bc27a182
Exists in
master
and in
1 other branch
- show points normalized in the interval [0,20].
Showing
2 changed files
with
5 additions
and
3 deletions
Show diff stats
BUGS.md
... | ... | @@ -5,7 +5,6 @@ |
5 | 5 | - modal a pedir confirmação de submissão. |
6 | 6 | - implementar singlepage/multipage |
7 | 7 | - numeros das perguntas não fazem sentido quando há caixas de informação |
8 | -- pontos devem estar normalizados escala 0-20 | |
9 | 8 | - testar regex na definicao das perguntas. como se faz rawstring em yaml? singlequote? problemas de backslash??? sim... necessário fazer \\ em varios casos, mas não é claro! e.g. \n é convertido em espaço mas \w é convertido em \\ e w. |
10 | 9 | |
11 | 10 | |
... | ... | @@ -16,5 +15,6 @@ |
16 | 15 | - criar perguntas de outros tipos, e.g. associação, ordenação, varios textinput |
17 | 16 | |
18 | 17 | # FIXED |
18 | +- pontos devem estar normalizados escala 0-20 | |
19 | 19 | - mostrar numero de alunos online em /students |
20 | 20 | - mostrar cotacao das perguntas, show_points, default:False | ... | ... |
templates/test.html
... | ... | @@ -100,7 +100,9 @@ |
100 | 100 | 'markdown.extensions.def_list', |
101 | 101 | 'markdown.extensions.sane_lists'])} |
102 | 102 | </%def> |
103 | - | |
103 | + <% | |
104 | + total_points = sum(q['points'] for q in questions) | |
105 | + %> | |
104 | 106 | % for i,q in enumerate(questions): |
105 | 107 | <div class="ui-corner-all custom-corners"> |
106 | 108 | % if q['type'] == 'information': |
... | ... | @@ -190,7 +192,7 @@ |
190 | 192 | |
191 | 193 | % if t['show_points']: |
192 | 194 | <p class="text-right"> |
193 | - <small>(${q['points']} ponto)</small> | |
195 | + <small>(${q['points'] / total_points * 20.0} pontos)</small> | |
194 | 196 | <p> |
195 | 197 | % endif |
196 | 198 | ... | ... |