How do I store variable values to a retrievable file?

Get help using Construct 2

Post » Fri Feb 05, 2016 7:10 pm

Hello everyone!

My first post as I am new to Construct and just started my first project.
I'm doing a PhD in Psychological Test construction and am using construct to develop a web app for a basic math test for children (and for games if I happen to have time left :))

I have a very specific need and haven't found any solution through google or the forums here.
As the test taker progresses, his answers are stored in global variables.
For example: The subject chooses answer 1 on the first item, which is stored in the global variable Item1.

On the next task, his answer will be stored in the variable Item2 and so forth.

Now what I want is for the app to export the ItemX variables into a local file (CSV for example) for me to grab and save, so that i can analyze the results results without having to watch the test taker and manually note every answer he as clicked. I have tried the CSV plugin but cannot find out how to use it, and if I understood correctly it is not used in the way that i would like.

I have almost no knowledge about web technologies and only a superficial grasp of programming which is why I am using Construct.

Did anybody try to achieve something similiar? Do i need to take a different approach if i want to store "answers" of multiple choice questions externally? Or could i somehow make the app generate a html file at the end that contains a table with the variable names and last values and which I could copy paste to excell? What I want to achieve is storing the complete variable names with their value in some file that i can access, one way or another.

I absolutely love this software but now after my first 2 days with it I'm finally stuck.

Here is the most recent Version of my project if somebody wants to have a better idea of how it works.
EDIT: As I'm new i cannot post URL's. add https
drive.google.com/file/d/0B9TNkMBUWc7WTUxTaXdBSG9RSlE/view?usp=sharing

Thank you very much for any help!
B
3
Posts: 6
Reputation: 194

Post » Fri Feb 05, 2016 11:39 pm

Hi Angroid! Have you considered using arrays to store your answers? From what you've said, I think that's a better solution. Once you're using arrays, you can use the "Download" action to save it to a file (JSON), or do whatever else you want with the data.
Image
B
10
S
3
G
2
Posts: 196
Reputation: 2,053

Post » Sat Feb 06, 2016 7:16 am

Hello,

Many thanks for pointing that out!
After having a look at the manual page I think this is indeed the most forward way to accomplish what I want.
Will keep the post updated after trying in case others have the same need. :geek:
B
3
Posts: 6
Reputation: 194

Post » Sun Feb 07, 2016 6:38 pm

Hello,

I tried using an array and after some fiddling around it works. It lets you download a .json string that can be read by any text editor or browser. The data it contains can be converted to csv or excell using tools available online.

What i noticed though is that most of these tools don't translate nested arrays correctly, only the first list is recognized and converted. In this case it contains the "size" part of the array. I got a perfect translation to csv by removing the size part of the string and let it start with the "data" part after the opening accolade.

Hope that helps and many thanks for the hint!
B
3
Posts: 6
Reputation: 194


Return to How do I....?

Who is online

Users browsing this forum: Janaina, marcinkowski and 2 guests