Make trial_type a string in JsPsychData

I forgot to do this when migrating the core to use plugin objects.
@jansim was first with this in #661, so he gets the credits!

Closes #2076
Co-authored-by: Jan Simson <jan.simson@three-2-one.com>
This commit is contained in:
bjoluc 2021-08-12 18:06:22 +02:00
parent 56d6fd9d0b
commit 017b45d87e

View File

@ -39,7 +39,7 @@ export class JsPsychData {
//var trial_opt_data = typeof trial.data == 'function' ? trial.data() : trial.data; //var trial_opt_data = typeof trial.data == 'function' ? trial.data() : trial.data;
var default_data = { var default_data = {
trial_type: trial.type, trial_type: trial.type.info.name,
trial_index: progress.current_trial_global, trial_index: progress.current_trial_global,
time_elapsed: this.jsPsych.totalTime(), time_elapsed: this.jsPsych.totalTime(),
internal_node_id: this.jsPsych.currentTimelineNodeID(), internal_node_id: this.jsPsych.currentTimelineNodeID(),