You’re right — I forgot to include it.However, by modifying this part of the code
a = expInfo["participant"];
exclude_trial = nom_fichier; // récupère la valeur de la colonne "nom_fichier"
database = await psychoJS.shelf.getDictionaryFieldValue({
key: ["Liste_info"],
fieldName: a,
defaultValue: {}
});
console.log("contenue de la liste tirer du serveur ",a, ":", database);
if (!("exclusionlv4" in database)) {
database = []; // This resets the exclusios if it doesn't already include exclusionlv4, which seems odd
}
console.log("contenue de la liste de ",a, ":", database);
database.push(exclude_trial);
console.log("contenue de la liste de ",a, ":", database);
await psychoJS.shelf.setDictionaryFieldValue({
key: ["Liste_info"],
fieldName: a,
fieldValue: database
});
the server does return the list. The issue is that I can’t figure out how to edit it to add new items.
My goal is to keep track of the test sets I’ve used during a session so I can exclude them later (and possibly replace a loop with a simple random draw).
Maybe there’s a better strategy for this, but this seemed like the most straightforward solution based on the sources you provided. I thought it could be interesting to do it locally and create a csv in the gitlab and edit it during the experiment. I don’t know if it’s possible
