Skip to content

Commit 8d8fc51

Browse files
jesscalllaemtl
authored andcommitted
Amend metadata to include current user as annotation author
1 parent e489cdb commit 8d8fc51

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

modules/electrophysiology_browser/jsx/react-series-data-viewer/src/series/components/AnnotationForm.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@ const AnnotationForm = ({
104104
channels: 'all',
105105
description: comment,
106106
},
107-
// TODO: Figure out data that should go here
108-
metadata: {
109-
description: 'An annotation',
110-
sources: 'LORIS',
111-
author: 'LORIS user',
112-
},
113107
};
114108

115109
const newAnnotation : EpochType = {

modules/electrophysiology_browser/php/annotations.class.inc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ class Annotations extends \NDB_Page
119119
}
120120

121121
$instance_data = $parameters['instance'];
122-
$metadata = $parameters['metadata'];
122+
$metadata = [
123+
'description' => 'An annotation',
124+
'sources' => 'EEGNet LORIS',
125+
'author' => $user->getFullname()
126+
];
123127
$instance_id = $parameters['instance_id'] ?? null;
124128
$parameter_id = $parameters['parameter_id'] ?? null;
125129

modules/electrophysiology_browser/php/models/electrophysioannotations.class.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class ElectrophysioAnnotations
292292
);
293293

294294
$tsv_entries = [
295-
'onset', 'duration', 'label', 'channels', 'aboslute_time', 'description'
295+
'onset', 'duration', 'label', 'channels', 'absolute_time', 'description'
296296
];
297297

298298
$tsv = $db->pselect(

0 commit comments

Comments
 (0)