|
a/OSSEval/analysis/templatetags/custom_tags.py |
|
b/OSSEval/analysis/templatetags/custom_tags.py |
|
... |
|
... |
25 |
answer = Answer.objects.get(question=question, instance=instance)
|
25 |
answer = Answer.objects.get(question=question, instance=instance)
|
26 |
score += answer.score
|
26 |
score += answer.score
|
27 |
except:
|
27 |
except:
|
28 |
pass
|
28 |
pass
|
29 |
return "(" + str(score) + ") <strong>" + instance.name + "</strong>"
|
29 |
return "(" + str(score) + ") <strong>" + instance.name + "</strong>"
|
|
|
30 |
|
|
|
31 |
@register.simple_tag
|
|
|
32 |
def question_weight(question_id, weight_scenario, *args, **kwargs):
|
|
|
33 |
if weight_scenario.question_weight(question_id) != 1:
|
|
|
34 |
return " ( * " + str(weight_scenario.question_weight(question_id)) + " )"
|
|
|
35 |
else:
|
|
|
36 |
return ""
|