From b5b2b0c7b43d5d89aff290a403d347bd2b460d69 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Tue, 21 Apr 2015 12:41:39 +0200 Subject: [PATCH] separate attribute for texts in response object --- knowledge/survey/interfaces.py | 3 ++- knowledge/survey/questionnaire.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/knowledge/survey/interfaces.py b/knowledge/survey/interfaces.py index 6bc8c0b..1ea9164 100644 --- a/knowledge/survey/interfaces.py +++ b/knowledge/survey/interfaces.py @@ -80,7 +80,8 @@ class IResponse(Interface): questionnaire = Attribute('The questionnaire this response belongs to.') party = Attribute('Some identification of the party that responded ' '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(): """ Calculate the result for this response. diff --git a/knowledge/survey/questionnaire.py b/knowledge/survey/questionnaire.py index 3051efc..4f28d4d 100644 --- a/knowledge/survey/questionnaire.py +++ b/knowledge/survey/questionnaire.py @@ -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 # it under the terms of the GNU General Public License as published by @@ -83,6 +83,7 @@ class Response(object): self.questionnaire = questionnaire self.party = party self.values = {} + self.texts = {} def getResult(self): result = {}