Skip to content

Commit

Permalink
[LINST] skip metadatafields for surveys
Browse files Browse the repository at this point in the history
  • Loading branch information
ridz1208 committed Aug 10, 2023
1 parent d69d61e commit 267c130
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion php/libraries/NDB_BVL_Instrument.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,11 @@ abstract class NDB_BVL_Instrument extends NDB_Page
*/
function _saveValues(array $values): void
{
if (strrpos($this->testName, "_proband") === false) {
// Surveys do not ask for the metadata informatio nand thus date_taken is
// always null so there is no use in going into the savecandidateage function
if (strrpos($this->testName, "_proband") === false
&& $this->DataEntryType === 'normal'
) {
$this->_saveCandidateAge($values);
}

Expand Down
4 changes: 3 additions & 1 deletion php/libraries/NDB_BVL_Instrument_LINST.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,9 @@ class NDB_BVL_Instrument_LINST extends \NDB_BVL_Instrument
'instrument_title',
$pieces[1]
);
$this->_addMetadataFields();
if ($this->DataEntryType!=="DirectEntry") {
$this->_addMetadataFields();
}
}
break;
case 'begingroup':
Expand Down

0 comments on commit 267c130

Please sign in to comment.