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,7 +5,6 @@ | ||
| 5 | - modal a pedir confirmação de submissão. | 5 | - modal a pedir confirmação de submissão. |
| 6 | - implementar singlepage/multipage | 6 | - implementar singlepage/multipage |
| 7 | - numeros das perguntas não fazem sentido quando há caixas de informação | 7 | - numeros das perguntas não fazem sentido quando há caixas de informação |
| 8 | -- pontos devem estar normalizados escala 0-20 | ||
| 9 | - 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. | 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,5 +15,6 @@ | ||
| 16 | - criar perguntas de outros tipos, e.g. associação, ordenação, varios textinput | 15 | - criar perguntas de outros tipos, e.g. associação, ordenação, varios textinput |
| 17 | 16 | ||
| 18 | # FIXED | 17 | # FIXED |
| 18 | +- pontos devem estar normalizados escala 0-20 | ||
| 19 | - mostrar numero de alunos online em /students | 19 | - mostrar numero de alunos online em /students |
| 20 | - mostrar cotacao das perguntas, show_points, default:False | 20 | - mostrar cotacao das perguntas, show_points, default:False |
templates/test.html
| @@ -100,7 +100,9 @@ | @@ -100,7 +100,9 @@ | ||
| 100 | 'markdown.extensions.def_list', | 100 | 'markdown.extensions.def_list', |
| 101 | 'markdown.extensions.sane_lists'])} | 101 | 'markdown.extensions.sane_lists'])} |
| 102 | </%def> | 102 | </%def> |
| 103 | - | 103 | + <% |
| 104 | + total_points = sum(q['points'] for q in questions) | ||
| 105 | + %> | ||
| 104 | % for i,q in enumerate(questions): | 106 | % for i,q in enumerate(questions): |
| 105 | <div class="ui-corner-all custom-corners"> | 107 | <div class="ui-corner-all custom-corners"> |
| 106 | % if q['type'] == 'information': | 108 | % if q['type'] == 'information': |
| @@ -190,7 +192,7 @@ | @@ -190,7 +192,7 @@ | ||
| 190 | 192 | ||
| 191 | % if t['show_points']: | 193 | % if t['show_points']: |
| 192 | <p class="text-right"> | 194 | <p class="text-right"> |
| 193 | - <small>(${q['points']} ponto)</small> | 195 | + <small>(${q['points'] / total_points * 20.0} pontos)</small> |
| 194 | <p> | 196 | <p> |
| 195 | % endif | 197 | % endif |
| 196 | 198 |