project.questionaire module¶
Summary¶
Classes:
hols a localized question |
|
hold the description of a question |
|
holds all relevant data of a questionaire |
Reference¶
-
class
project.questionaire.
Questionaire
(global_id, language_map, questions)[source]¶ Bases:
object
holds all relevant data of a questionaire
-
global_questionaire_id
= ''¶
-
__init__
(global_id, language_map, questions)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
language_map
= {}¶
-
questions
= []¶ initialization
:paran str global_id – the globally unique identifier of this questionaire. This is needed to connect questionaires with anwsers. :param dict language_map – (dict of str: (str: str)) – containes the text-snippets used in this questionaire in every supported language. The mapping is “language” -> “id” -> “text :param list questions – (list of Question)the actual questions in the questionaire
-
-
class
project.questionaire.
Question
(question_id, anwser_type, options=[])[source]¶ Bases:
object
hold the description of a question
-
__init__
(question_id, anwser_type, options=[])[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
question_id
= ''¶
-
anwser_type
= ''¶
-
options
= []¶ initialization
:param str question_id – the identifier of the question. This is needed to idenitify the corresponing question test stored in the Questionaire’S language_map and associate questions with anwsers :param str anwser_type – which kind of anwser is expected (string, date, PLZ,…) :param list options – optional (array of strings) specifies all possible anwsers
-
-
class
project.questionaire.
LocalizedQuestion
(question, question_text, options_texts)[source]¶ Bases:
project.questionaire.Question
hols a localized question
-
__init__
(question, question_text, options_texts)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
question_text
= ''¶
-
options_texts
= []¶ initialization
:param Question question – the question :param str question_text – the text of the question :param options_texts – (list of str) the texts of the options
-