1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00

corrected issue with saving of partial results

This commit is contained in:
Alain Pitiot 2024-05-21 14:20:48 +02:00
parent ff43ba400d
commit 8a6209b302
2 changed files with 5 additions and 1 deletions

View File

@ -437,7 +437,7 @@ export class PsychoJS
{
self._experiment.save({
tag: "",
clear: true
clear: false
});
},
self._config.experiment.resultsUpload.period * 60 * 1000

View File

@ -296,11 +296,15 @@ export class ExperimentHandler extends PsychObject
// we need a header if it is asked for and there is actual data to save:
const withHeader = this._isCsvHeaderNeeded && (data.length > 0);
/* INCORRECT: since new attributes can be added throughout the participant session, we need, currently,
to upload the whole result data, on each call to save.
// if we are outputting a header on this occasion, we won't need one thereafter:
if (this._isCsvHeaderNeeded)
{
this._isCsvHeaderNeeded = !withHeader;
}
*/
// TODO only save the given attributes
const worksheet = XLSX.utils.json_to_sheet(data, {skipHeader: !withHeader});