Skip to content

Commit

Permalink
Phan pt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
CamilleBeau committed Jan 15, 2024
1 parent 3d593be commit 05d1420
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 2 additions & 1 deletion modules/candidate_parameters/ajax/getData.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,15 @@ function getConsentStatusFields()
];
}

$comments = [];

foreach ($consentDetails as $consentID=>$consent) {
$consentName = $consent['Name'];
$consentList[$consentName] = $consent['Label'];
$groupID = $consent['ConsentGroupID'];

// Append consent as a child to its group
$consentGroups[$groupID]['Children'][] = $consentName;
$comments = [];

if (isset($candidateConsent[$consentID])) {
$candidateConsentID = $candidateConsent[$consentID];
Expand Down
10 changes: 2 additions & 8 deletions php/libraries/Candidate.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -896,14 +896,8 @@ class Candidate implements \LORIS\StudyEntities\AccessibleResource,

$candID = $this->getCandID();

$query = "SELECT
ConsentID,
Name,
Status,
DateGiven,
DateWithdrawn,
Label,
Comment
$query = "SELECT cc.ConsentID, c.Name, cc.Status, cc.DateGiven,
cc.DateWithdrawn, c.Label, cc.Comment
FROM candidate_consent_rel cc JOIN consent c USING (ConsentID)
WHERE CandidateID=:cid";
$where = ['cid' => $candID];
Expand Down

0 comments on commit 05d1420

Please sign in to comment.