-
Notifications
You must be signed in to change notification settings - Fork 183
[dictionary] Cohort Filter #9390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
be20fee
01c1285
7aa2aef
c5c7f15
ad5ee74
9447650
6ddd7c3
89a24a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,15 @@ class DataDictRowProvisioner extends \LORIS\Data\ProvisionerInstance | |
$status = 'Empty'; | ||
} | ||
|
||
$cohorts = $DB->pselectCol( | ||
"SELECT GROUP_CONCAT(DISTINCT c.title) FROM test_names tn | ||
JOIN test_battery tb ON tn.Test_name=tb.Test_name | ||
JOIN cohort c ON tb.CohortID=c.CohortID | ||
WHERE tn.Test_name=:tn | ||
ORDER BY c.title", | ||
['tn' => $cat->getName()] | ||
Comment on lines
+73
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I personally prefer to not use group concats (lists should be lists, not strings with commas), but if that's what the rest of the code does I am willing to accept it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah this is what the rest of it was like so probably best to keep it the same |
||
); | ||
|
||
$visits = $qe->getVisitList($cat, $item); | ||
$dict[] = $this->getInstance( | ||
$module, | ||
|
@@ -77,6 +86,7 @@ class DataDictRowProvisioner extends \LORIS\Data\ProvisionerInstance | |
$desc, | ||
$status, | ||
$visits, | ||
$cohorts, | ||
); | ||
} | ||
} | ||
|
@@ -96,6 +106,7 @@ class DataDictRowProvisioner extends \LORIS\Data\ProvisionerInstance | |
* @param string $desc The overridden description of the item | ||
* @param string $descstatus The status of the description override | ||
* @param ?[]string $visits The visits for session scoped variables | ||
* @param ?[]string $cohorts The cohorts for session scoped variables | ||
* | ||
* @return \LORIS\Data\DataInstance An instance representing this row. | ||
*/ | ||
|
@@ -106,7 +117,16 @@ class DataDictRowProvisioner extends \LORIS\Data\ProvisionerInstance | |
string $desc, | ||
string $descstatus, | ||
array $visits, | ||
array $cohorts, | ||
) : \LORIS\Data\DataInstance { | ||
return new DataDictRow($module, $cat, $item, $desc, $descstatus, $visits); | ||
return new DataDictRow( | ||
$module, | ||
$cat, | ||
$item, | ||
$desc, | ||
$descstatus, | ||
$visits, | ||
$cohorts, | ||
); | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.