Skip to content

Commit

Permalink
Amend metadata to include current user as annotation author
Browse files Browse the repository at this point in the history
  • Loading branch information
jesscall authored and laemtl committed Nov 25, 2022
1 parent b124e7e commit 5063dda
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ const AnnotationForm = ({
channels: 'all',
description: comment,
},
// TODO: Figure out data that should go here
metadata: {
description: 'An annotation',
sources: 'LORIS',
author: 'LORIS user',
},
};

const newAnnotation : EpochType = {
Expand Down
6 changes: 5 additions & 1 deletion modules/electrophysiology_browser/php/annotations.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ class Annotations extends \NDB_Page
}

$instance_data = $parameters['instance'];
$metadata = $parameters['metadata'];
$metadata = [
'description' => 'An annotation',
'sources' => 'EEGNet LORIS',
'author' => $user->getFullname()
];
$instance_id = $parameters['instance_id'] ?? null;
$parameter_id = $parameters['parameter_id'] ?? null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class ElectrophysioAnnotations
);

$tsv_entries = [
'onset', 'duration', 'label', 'channels', 'aboslute_time', 'description'
'onset', 'duration', 'label', 'channels', 'absolute_time', 'description'
];

$tsv = $db->pselect(
Expand Down

0 comments on commit 5063dda

Please # to comment.