diff --git a/questions.py b/questions.py index 1cc40d4..02e8118 100644 --- a/questions.py +++ b/questions.py @@ -381,7 +381,8 @@ class QuestionTextArea(Question): except subprocess.TimeoutExpired: p.kill() # p.communicate() # FIXME parece que este communicate obriga a ficar ate ao final do processo, mas nao consigo repetir o comportamento num script simples... - self['grade'] = 0.0 # student gets a zero if timout occurs + value = 0.0 # student gets a zero if timout occurs + printf(' * Timeout in correction script') # In case the correction program returns a non float value, we assume an error # has occurred (for instance, invalid input). We just assume its the student's diff --git a/templates/test.html b/templates/test.html index 8e8b2b9..2c5e0ce 100644 --- a/templates/test.html +++ b/templates/test.html @@ -162,7 +162,7 @@ % for opt in q['options']:
${random.choice(t['offensive']) if 'offensive' in t else ''}
+ + ${round(q['grade'] * q['points'] / total_points * 20.0, 1)} pontos