separate attribute for texts in response object

This commit is contained in:
Helmut Merz 2015-04-21 12:41:39 +02:00
parent aa8814b29b
commit b5b2b0c7b4
2 changed files with 4 additions and 2 deletions

View file

@ -80,7 +80,8 @@ class IResponse(Interface):
questionnaire = Attribute('The questionnaire this response belongs to.') questionnaire = Attribute('The questionnaire this response belongs to.')
party = Attribute('Some identification of the party that responded ' party = Attribute('Some identification of the party that responded '
'to this questionnaire.') 'to this questionnaire.')
values = Attribute('A mapping associating response values with questions.') values = Attribute('A mapping associating numeric response values with questions.')
texts = Attribute('A mapping associating text response values with questions.')
def getResult(): def getResult():
""" Calculate the result for this response. """ Calculate the result for this response.

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2013 Helmut Merz helmutm@cy55.de # Copyright (c) 2015 Helmut Merz helmutm@cy55.de
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -83,6 +83,7 @@ class Response(object):
self.questionnaire = questionnaire self.questionnaire = questionnaire
self.party = party self.party = party
self.values = {} self.values = {}
self.texts = {}
def getResult(self): def getResult(self):
result = {} result = {}