having an issue logging to csv (simple minno server) using minno server

46 views
Skip to first unread message

Natasha Maniar

unread,
Sep 2, 2020, 2:36:06 AM9/2/20
to Minno.js
I used the minno server dashboard and added the simple minno server test. I'm able to print the logs to the console but not able to add a csv to results folder. 
I tried using fs (modules from java) to write to a csv but I'm getting an error with 
require(module); 

is there something I'm missing, any other way I can do this? 

Thank you 

Elad Zlotnick

unread,
Sep 2, 2020, 10:49:11 AM9/2/20
to Minno.js
Hi Natasha,

I'm not sure I understand what you have done.
Are you using the dashboard which is part of the full fledged server (i.e. https://github.com/minnojs/minno-server)
Or the simple server?

Did you successfully set up a php server?
Could you get the sample study running?
Logging data?
What is your file structure like (i.e. which folders and files do you have on your server?)

best,
Elad

Natasha Maniar

unread,
Sep 2, 2020, 4:46:23 PM9/2/20
to Minno.js
Yes I am using the dashboard from https://github.com/minnojs/minno-server, not using a php server 
Basically I added a study in the dashboard and added the files/folders from simple minno server. 
my file structure:
results 
   - .gitignore
   - htaccess
study.race
   - mgr.js 
   - raceiat.js
   ... (all the other files in this folder and I added a modified iat test (amp_iat from the extensions folder) so that raceiat calls that modified extension rather than the link originally from project implicit) 
- index.html
- csv.php

I was able to run the mgr.js file and have the iat test running (raceiat), I can print the logs to console with this code in my iat test file: 
API.addSettings('hooks',{
    endTask: function(){
var logs = API.getLogs();//saving the logs
console.log(logs);

however this somehow doesn't work to write to the results folder and add a csv: API.addSettings('logger',{type:'csv', url:'csv.php'});

Hopefully that clarifies my issue, for some reason I can't seem to attach files but I can send my code over as well if that doesn't make sense. 

Elad Zlotnick

unread,
Sep 3, 2020, 3:25:25 AM9/3/20
to Minno.js
Hi Natasha,

The minno-server is not designed to save csv, rather it works directly with structured data (i.e. JSON).
You should not use the CSV logger with it, rather use the default (new) logger.
It should automatically log to minno-server and save the data into your database.

You can see many working examples of studies in the bank of studies (go to the studies tab, click the top dropdown that says show all my studies and pick show bank studies).
You can the download your results from the study page (click the options button on the top left and choose "data").

Additional documentation is available at https://minnojs.github.io/docsite/minnosuitedashboard/

best,
Elad
Reply all
Reply to author
Forward
0 new messages