Commit f6cf71eee3092791295a964973de1127ad13d0ba

Authored by Miguel Barão
1 parent db96ae64
Exists in master and in 1 other branch dev

- undo previous changes

Showing 2 changed files with 3 additions and 3 deletions   Show diff stats
@@ -277,7 +277,7 @@ class QuestionNumericInterval(Question): @@ -277,7 +277,7 @@ class QuestionNumericInterval(Question):
277 # answer = locale.atof(self['answer']) 277 # answer = locale.atof(self['answer'])
278 278
279 except ValueError: 279 except ValueError:
280 - self['comments'] = '\n\n'.join(['A resposta dada não é numérica.', self['comments']]) 280 + self['comments'] = 'A resposta dada não é numérica.'
281 self['grade'] = 0.0 281 self['grade'] = 0.0
282 else: 282 else:
283 self['grade'] = 1.0 if lower <= answer <= upper else 0.0 283 self['grade'] = 1.0 if lower <= answer <= upper else 0.0
@@ -326,7 +326,7 @@ class QuestionTextArea(Question): @@ -326,7 +326,7 @@ class QuestionTextArea(Question):
326 self['grade'] = float(out) 326 self['grade'] = float(out)
327 327
328 elif isinstance(out, dict): 328 elif isinstance(out, dict):
329 - self['comments'] = out.get('comments', '') 329 + self['comments'] = out.get('comments', self['comments'])
330 try: 330 try:
331 self['grade'] = float(out['grade']) 331 self['grade'] = float(out['grade'])
332 except ValueError: 332 except ValueError:
templates/review-question.html
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 <p class="text-secondary"> 82 <p class="text-secondary">
83 <i class="fa fa-ban fa-3x" aria-hidden="true"></i> 83 <i class="fa fa-ban fa-3x" aria-hidden="true"></i>
84 {{ round(q['grade'] * q['points'], 2) }} pontos<br> 84 {{ round(q['grade'] * q['points'], 2) }} pontos<br>
85 - {{ md(q['comments'], q) }} 85 + {{ q['comments'] }}
86 </p> 86 </p>
87 </div> <!-- card-footer --> 87 </div> <!-- card-footer -->
88 </div> <!-- card --> 88 </div> <!-- card -->