Skip to content

Commit

Permalink
Use the new questionType to determine if a response is a part of a qu…
Browse files Browse the repository at this point in the history
…estion grid
  • Loading branch information
loichenninger committed Sep 10, 2024
1 parent 984bc36 commit 3b801b1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/fr/insee/bpm/metadata/reader/ddi/DDIReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,7 @@ private static void addVariableToVariablesMap(VariablesMap variablesMap, Group g
UcqVariable variable = new UcqVariable(variableName, group, variableType, variableLength);
if (questionName != null) {
variable.setQuestionName(questionName.getTextContent());
} /*else if (mcqElement != null) {
variable.setQuestionName(mcqElement.getTextContent());
variable.setInQuestionGrid(true);
}*/
}
NodeList valueElements = valuesElement.getChildNodes();
addValues(variable, valueElements);
variablesMap.putVariable(variable);
Expand All @@ -215,6 +212,10 @@ private static void addVariableToVariablesMap(VariablesMap variablesMap, Group g
variablesMap.putVariable(variable);
} else {
Variable variable = new Variable(variableName, group, variableType, variableLength);
// Not sure if it's the right place to set this
if (questionType != null && questionType.getTextContent().equals("GRID")) {
variable.setInQuestionGrid(true);
}
if (questionName != null) {
variable.setQuestionName(questionName.getTextContent());
} else {
Expand Down

0 comments on commit 3b801b1

Please sign in to comment.