Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions modules/dataquery/php/query.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -761,11 +761,7 @@ class Query implements \LORIS\StudyEntities\AccessibleResource,
throw new \Exception("Unhandled operator: " . $crit['op']);
}

// FIXME: Verify visits, test was done with candidate scope data
$visitlist = null;
if (isset($crit['visits'])) {
$visitlist = $crit['visits'];
}
$visitlist = $crit['visits'] ?? null;

\Profiler::checkpoint("Calling engine get matches");
$matches = $engine->getCandidateMatches($term, $visitlist);
Expand Down
3 changes: 1 addition & 2 deletions src/Data/Query/SQLQueryEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function getCandidateMatches(
$this->addWhereClause("c.Active='Y'");
$prepbindings = [];

$this->buildQueryFromCriteria($term, $prepbindings);
$this->buildQueryFromCriteria($term, $prepbindings, $visitlist);

$query = 'SELECT DISTINCT c.CandID FROM';

Expand Down Expand Up @@ -582,7 +582,6 @@ protected function buildQueryFromCriteria(
);

if ($visitlist != null) {
$this->addTable("LEFT JOIN session s ON (s.CandidateID=c.ID AND s.Active='Y')");
Comment thread
HenriRabalais marked this conversation as resolved.
$inset = [];
$i = count($prepbindings);
foreach ($visitlist as $vl) {
Expand Down
Loading