Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the XML export, add the question ID as a property of the related ChoiceAnswers #524

Open
joepvgenuchten opened this issue Feb 28, 2024 · 1 comment
Assignees

Comments

@joepvgenuchten
Copy link

joepvgenuchten commented Feb 28, 2024

Is your feature request related to a problem? Please describe.
Context: I'm trying to transform the results of the survey to RDF (in the context of FAIR data) for a study we are doing in the context the int:net Horizon Europe project.

problem; while the XML export is very powerful (and for data management purposes much more reliable than the spreadsheet output), it relies on the order of Question and Answer elements to associate answers of type "Choice answer" to the correct Question element. For example:

<?xml version="1.0" encoding="UTF-8"?>
<Results create="2024-02-27_14-35-46">
	<Survey id="707468" uid="89146514-1776-4ad0-b72b-3d5a2359134a" alias="Eminent">
		<Elements lang="EN">
			<Question id="1" type="Multiple Choice">1. Which SGAM domain(s) best describe your area of expertise </Question>
			<Answer id="a" type="Choice Answer">Customer Premises</Answer>
			<Answer id="b" type="Choice Answer">DER</Answer>
			<Answer id="c" type="Choice Answer">Distribution</Answer>
			<Question id="2" type="Multiple Choice">2. Which SGAM zone(s) best describe your area of expertise?&lt;br /&gt;(SGAM- Smart energy Grid Architecture Model)</Question>
			<Answer id="d" type="Choice Answer">Transmission</Answer>
			<Answer id="e" type="Choice Answer">Generation</Answer>
	</Survey>
	<Answers>
		<AnswerSet list="35897065">
			<Answer qid="f" aid="8"></Answer>
			<Answer qid="g" aid="6"></Answer>
			<Answer qid="h" aid="e5"></Answer>
			<Answer qid="i" aid="30c"></Answer>
			<Answer qid="j" aid="3e4e4907"></Answer>
			<Answer qid="k" aid="174"></Answer>
			<Answer qid="l" aid="6507"></Answer>
		</AnswerSet>
	</Answers>
</Results>

It should be possible to relate
<Answer id="a" type="Choice Answer">Customer Premises</Answer>

To the question to which it is a possible answer, in this case:
<Question id="1" type="Multiple Choice">1. Which SGAM domain(s) best describe your area of expertise?</Question>

without having rely on the order in which the elements occur as xml does not require order to be preserved.

Describe the solution you'd like
Add a qid to the Answer elements in the Survey element (the duplicate use of the term Answer for 2 things that have distinct semantics is also confusing, but that is more easily overcome given the structure of the document), just as is done for Answer Elements in the Answers element. That way, the link between multiple choice question and allowed answers is explicit

Describe alternatives you've considered
Alternatively the Choice Answers could be nested inside the Question Elements for which they may be selected.

Thank you

@origabe origabe self-assigned this Mar 4, 2024
@jobenjada
Copy link

hey! Not sure if the EU Survey team is still actively developing the solution. We've been working on a free & open source (AGPLv3) survey platform for almost 2 year now and keep improving it daily: Have a look at Formbricks

Github repo: https://github.com/formbricks/formbricks
Website: https://formbricks.com/

Happy to answer any questions in our Discord :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants