From 0cec511a9fc9aad65f655f7b106e9096e7636d0a Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Thu, 13 Aug 2015 16:12:53 +0200 Subject: [PATCH] take personId into account in all relevant places --- knowledge/survey/browser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/knowledge/survey/browser.py b/knowledge/survey/browser.py index d08cab2..bf2f6cd 100644 --- a/knowledge/survey/browser.py +++ b/knowledge/survey/browser.py @@ -52,7 +52,7 @@ class SurveyView(InstitutionMixin, ConceptView): template = template - adminMaySelectAllInstitutions = False + #adminMaySelectAllInstitutions = False @Lazy def macro(self): @@ -190,7 +190,7 @@ class SurveyView(InstitutionMixin, ConceptView): data = respManager.load(uid, instUid) if data: resp = Response(self.adapted, self.personId) - for qu in self.adapted.questions: + for qu in self.adapted.getQuestions(self.personId): if qu.questionType in (None, 'value_selection'): if qu.uid in data: value = data[qu.uid] @@ -331,7 +331,7 @@ class SurveyView(InstitutionMixin, ConceptView): def check(self, response): errors = [] values = response.values - for qu in self.adapted.questions: + for qu in self.adapted.getQuestions(self.personId): if qu.required and qu not in values: errors.append(dict(uid=qu.uid, text='Please answer the obligatory questions.'))