diff --git a/php/libraries/Candidate.class.inc b/php/libraries/Candidate.class.inc index 43ecc2d7bad..1cec7378309 100644 --- a/php/libraries/Candidate.class.inc +++ b/php/libraries/Candidate.class.inc @@ -1082,7 +1082,7 @@ class Candidate implements \LORIS\StudyEntities\AccessibleResource, WHERE c.CandID=:candid", ['candid' => $this->getCandID()], ); - return $res['Description'] ?? ''; + return $res['Description'] ?? "Not found for CandID: {$this->getCandID()}"; } /** diff --git a/php/libraries/NDB_BVL_Feedback.class.inc b/php/libraries/NDB_BVL_Feedback.class.inc index 388a6b18cc2..b25ff7c8611 100644 --- a/php/libraries/NDB_BVL_Feedback.class.inc +++ b/php/libraries/NDB_BVL_Feedback.class.inc @@ -396,7 +396,7 @@ class NDB_BVL_Feedback $qparams['ComID'] = $this->_feedbackObjectInfo['CommentID']; } if (empty($select_inactive_threads)) { - $query .= " AND Active = 'Y'"; + $query .= " AND fbt.Active = 'Y'"; } $query .= " ORDER BY Status ASC"; diff --git a/test/unittests/CandidateTest.php b/test/unittests/CandidateTest.php index 35908e3331d..51bbe44b977 100644 --- a/test/unittests/CandidateTest.php +++ b/test/unittests/CandidateTest.php @@ -144,7 +144,7 @@ protected function setUp(): void $this->_factory->setDatabase($this->_dbMock); $this->_candidateInfo = [ - 'ID' => 63, + 'ID' => 111111, 'RegistrationCenterID' => 2, 'CandID' => new CandID('969664'), 'PSCID' => 'AAA0011', @@ -1194,7 +1194,7 @@ public function testParticipantStatusDescription() "participant_status", [ 0 => [ - 'CandidateID' => 63, + 'CandidateID' => 111111, 'participant_status' => '2', ] ] @@ -1203,7 +1203,7 @@ public function testParticipantStatusDescription() $this->_DB->run("DROP TEMPORARY TABLE participant_status_options"); $this->_DB->run("DROP TEMPORARY TABLE participant_status"); $this->assertEquals( - $this->_candidate->getPSCID() . '--' . $this->_candidate->getData('ID'), + $result, 'description2' ); }