Commit d0fcee910fdb1d39d045d27962a301d41bd0e633
1 parent
96ae3635
Exists in
master
and in
1 other branch
fix grade.html to show the grade
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
demo/demo.yaml
| @@ -35,7 +35,7 @@ autosubmit: false | @@ -35,7 +35,7 @@ autosubmit: false | ||
| 35 | # shown to the student. If false, the test is saved but not corrected. | 35 | # shown to the student. If false, the test is saved but not corrected. |
| 36 | # No grade is shown to the student. | 36 | # No grade is shown to the student. |
| 37 | # (default: true) | 37 | # (default: true) |
| 38 | -autocorrect: false | 38 | +autocorrect: true |
| 39 | 39 | ||
| 40 | # Show points for each question (min and max). | 40 | # Show points for each question (min and max). |
| 41 | # (default: true) | 41 | # (default: true) |
perguntations/templates/grade.html
| @@ -40,14 +40,14 @@ | @@ -40,14 +40,14 @@ | ||
| 40 | <!-- ================================================================== --> | 40 | <!-- ================================================================== --> |
| 41 | <div class="container"> | 41 | <div class="container"> |
| 42 | <div class="jumbotron"> | 42 | <div class="jumbotron"> |
| 43 | - {% if t['state'] == 'FINISHED' %} | 43 | + {% if t['state'] == 'CORRECTED' %} |
| 44 | + {% if t['grade'] - t['scale'][0] >= 0.75*(t['scale'][1] - t['scale'][0]) %} | ||
| 45 | + <i class="fas fa-thumbs-up fa-5x text-success" aria-hidden="true"></i> | ||
| 46 | + {% end %} | ||
| 44 | <h3>Resultado: | 47 | <h3>Resultado: |
| 45 | <strong>{{ f'{round(t["grade"], 3)}' }}</strong> | 48 | <strong>{{ f'{round(t["grade"], 3)}' }}</strong> |
| 46 | valores na escala [{{t['scale'][0]}},{{t['scale'][1]}}]. | 49 | valores na escala [{{t['scale'][0]}},{{t['scale'][1]}}]. |
| 47 | </h3> | 50 | </h3> |
| 48 | - {% if t['grade'] - t['scale'][0] >= 0.75*(t['scale'][1] - t['scale'][0]) %} | ||
| 49 | - <i class="fas fa-thumbs-up fa-5x text-success" aria-hidden="true"></i> | ||
| 50 | - {% end %} | ||
| 51 | {% elif t['state'] == 'SUBMITTED' %} | 51 | {% elif t['state'] == 'SUBMITTED' %} |
| 52 | <h3>A prova foi submetida com sucesso. Vai ser corrigida mais tarde.</h3> | 52 | <h3>A prova foi submetida com sucesso. Vai ser corrigida mais tarde.</h3> |
| 53 | {% elif t['state'] == 'QUIT' %} | 53 | {% elif t['state'] == 'QUIT' %} |