Skip to content

Commit

Permalink
Change subproject to cohort
Browse files Browse the repository at this point in the history
  • Loading branch information
driusan committed Nov 14, 2023
1 parent 1f845f9 commit 1d02b12
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/candidate_parameters/php/candidatequeryengine.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ class CandidateQueryEngine extends \LORIS\Data\Query\SQLQueryEngine
new Cardinality(Cardinality::SINGLE),
),
new DictionaryItem(
"Subproject",
"The LORIS subproject used for battery selection",
"Cohort",
"The LORIS cohort used for battery selection",
$sesscope,
new \LORIS\Data\Types\StringType(255),
new Cardinality(Cardinality::SINGLE),
Expand Down Expand Up @@ -173,7 +173,7 @@ class CandidateQueryEngine extends \LORIS\Data\Query\SQLQueryEngine
return [];
}

// Session scoped variables: VisitLabel, project, site, subproject
// Session scoped variables: VisitLabel, project, site, cohort
return array_keys(\Utility::getVisitList());
}

Expand Down Expand Up @@ -225,15 +225,15 @@ class CandidateQueryEngine extends \LORIS\Data\Query\SQLQueryEngine
.' ON (c.RegistrationProjectID=rproj.ProjectID)'
);
return 'rproj.Name';
case 'Subproject':
case 'Cohort':
$this->addTable('LEFT JOIN session s ON (s.CandID=c.CandID)');
$this->addTable(
'LEFT JOIN subproject subproj'
.' ON (s.SubprojectID=subproj.SubProjectID)'
'LEFT JOIN cohort cohort'
.' ON (s.CohortID=cohort.CohortID)'
);
$this->addWhereClause("s.Active='Y'");

return 'subproj.title';
return 'cohort.title';
case 'VisitLabel':
$this->addTable('LEFT JOIN session s ON (s.CandID=c.CandID)');
$this->addWhereClause("s.Active='Y'");
Expand Down

0 comments on commit 1d02b12

Please # to comment.