return relative scores as part of results

This commit is contained in:
Helmut Merz 2013-03-11 17:51:50 +01:00
parent 83732349a7
commit bf948e12b7
2 changed files with 2 additions and 2 deletions

View file

@ -58,4 +58,4 @@ Grouped Feedback Items
>>> res = resp01.getGroupedResult()
>>> for qugroup, fi, score in res:
... print fi.text, round(score, 2)
fi02 1.75
fi02 0.58

View file

@ -105,5 +105,5 @@ class Response(object):
if scoreMax > 0.0:
relScore = score / scoreMax
wScore = relScore * len(qugroup.feedbackItems) - 0.00001
result.append((qugroup, qugroup.feedbackItems[int(wScore)], wScore))
result.append((qugroup, qugroup.feedbackItems[int(wScore)], relScore))
return result