Alle Question-Inthalte komplett aufgesammelt
This commit is contained in:
parent
4ff8dbd26e
commit
2e5685ea0d
2 changed files with 23 additions and 12 deletions
|
|
@ -230,8 +230,8 @@
|
|||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1684368529445" ID="ID_676425093" MODIFIED="1684521720351" TEXT="Implementierung">
|
||||
<arrowlink DESTINATION="ID_1966384514" ENDARROW="Default" ENDINCLINATION="-105;-9;" ID="Arrow_ID_1306849550" STARTARROW="None" STARTINCLINATION="-105;-9;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1684425212214" ID="ID_426224894" MODIFIED="1684524018933" TEXT="SoSci-Definitionen einlesen">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1684425212214" ID="ID_426224894" MODIFIED="1684528331459" TEXT="SoSci-Definitionen einlesen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1684425286586" ID="ID_1263838545" MODIFIED="1684524021048" TEXT="alle <question>-Elemente aufsammeln">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
|
|
@ -241,10 +241,10 @@
|
|||
<node COLOR="#338800" CREATED="1684425317985" ID="ID_773218424" MODIFIED="1684525721084" TEXT="daraus ein polymorphes Python-Objekt generieren">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1684525722155" ID="ID_665875543" MODIFIED="1684525734052" TEXT="die jeweils spezifischen Informationen abgreifen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1684526192221" ID="ID_556963743" MODIFIED="1684526297179" TEXT="Likert">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1684525722155" ID="ID_665875543" MODIFIED="1684527788489" TEXT="die jeweils spezifischen Informationen abgreifen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1684526192221" ID="ID_556963743" MODIFIED="1684528325444" TEXT="Likert">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1684526194969" ID="ID_1729409252" MODIFIED="1684527045821" TEXT="die Labels">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
|
|
@ -264,12 +264,16 @@
|
|||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1684526245013" ID="ID_137118574" MODIFIED="1684526246697" TEXT="Text">
|
||||
<node CREATED="1684526247958" ID="ID_320449851" MODIFIED="1684526252134" TEXT="das Tag "lead""/>
|
||||
<node COLOR="#338800" CREATED="1684526245013" ID="ID_137118574" MODIFIED="1684527787538" TEXT="Text">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1684526247958" ID="ID_320449851" MODIFIED="1684527786312" TEXT="das Tag "lead"">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1684425327278" ID="ID_1210419956" MODIFIED="1684425420316" TEXT="dies in eine Map-keyed-by-ID ablegen">
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1684425327278" ID="ID_1210419956" MODIFIED="1684528329331" TEXT="dies in eine Map-keyed-by-ID ablegen">
|
||||
<arrowlink DESTINATION="ID_960847395" ENDARROW="Default" ENDINCLINATION="187;0;" ID="Arrow_ID_184243819" STARTARROW="None" STARTINCLINATION="187;0;"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1684425234772" ID="ID_829734331" MODIFIED="1684521730288" TEXT="SoSci-Questionaire verarbeiten">
|
||||
|
|
|
|||
|
|
@ -102,9 +102,10 @@ class TextElement(QuestionElement):
|
|||
|
||||
|
||||
def collectQuestionDefinitions():
|
||||
#
|
||||
questions = {}
|
||||
#
|
||||
root = ElementTree.parse(SOSCI_XML).getroot()
|
||||
|
||||
for section in root.findall('section'):
|
||||
title = section.find('title')
|
||||
id_prefix = getSpecificID(section)
|
||||
|
|
@ -117,7 +118,6 @@ def collectQuestionDefinitions():
|
|||
id_suffix = getSpecificID(question)
|
||||
id_suffix = int(id_suffix)
|
||||
questionID = "%s%02d" % (id_prefix, id_suffix)
|
||||
print("Question: ID=%s desc=%s type=%s title=%s " % (questionID, desc, questionType, title))
|
||||
if questionType == 'scale':
|
||||
element = LikertItem(questionID, question)
|
||||
elif questionType == 'select' or questionType == 'dropdown':
|
||||
|
|
@ -129,7 +129,14 @@ def collectQuestionDefinitions():
|
|||
else:
|
||||
__err("unbekannter QuestionType:"+questionType)
|
||||
|
||||
print(element.dump())
|
||||
questions[questionID] = element
|
||||
|
||||
print(questions.keys())
|
||||
for key in questions.keys():
|
||||
quest = questions[key]
|
||||
print("Question: ID=%s type=%s desc=%s" % (quest.qid, type(quest), quest.desc))
|
||||
print(quest.dump())
|
||||
|
||||
|
||||
|
||||
# Hilfsmittel für SoSci-XML: extrahiert ein ID-Element, das eingeschachtelt in <attributes.specific> liegt
|
||||
|
|
|
|||
Loading…
Reference in a new issue