-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added a customizable summary of LORIS statistics to the Login page for guest users to see - A new table was created that is populated with the counts of pinned dataquery queries, and separated by project - This table is read by the login module for projects with `showSummaryOnLogin` as true in the Project database table. - If no data is populated, then the summary is not shown on the login page - Data is populated by the new tool: `tools/update_login_summary_statistics.php`. It must be run for the data in the summary to be updated. Can be added to a project's nightly cron, or at each release - Some queries are not necessarily possible in the DQT, so in-order to keep it customizable for projects, I added the ability to add SQL files to a folder in project/tools/Login_Summary_Statistics that can be added to the summary list. - There is a clipboard icon at the bottom right where if you press it, your clipboard will be filled with a csv version of the data
- Loading branch information
Showing
25 changed files
with
775 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(DISTINCT c.CandID) AS count | ||
FROM candidate c | ||
JOIN Project ON c.RegistrationProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
AND c.Sex = 'Female' | ||
AND Entity_type = 'Human' | ||
GROUP BY Project.Name WITH ROLLUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(DISTINCT c.CandID) AS count | ||
FROM candidate c | ||
JOIN Project ON c.RegistrationProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
AND c.Sex = 'Male' | ||
AND Entity_type = 'Human' | ||
GROUP BY Project.Name WITH ROLLUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(DISTINCT psc.CenterID) AS count | ||
FROM psc | ||
JOIN session s ON s.CenterID = psc.CenterID | ||
JOIN Project ON s.ProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(CandID) AS count | ||
FROM session s | ||
JOIN Project ON s.ProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(DISTINCT TestID) AS count | ||
FROM flag f | ||
JOIN session s ON s.ID = f.SessionID | ||
JOIN Project ON s.ProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(FileID) AS count | ||
FROM files f | ||
JOIN session s ON s.ID = f.SessionID | ||
JOIN Project ON s.ProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(PhysiologicalFileID) AS count | ||
FROM physiological_parameter_file ppf | ||
LEFT JOIN physiological_file USING (PhysiologicalFileID) | ||
LEFT JOIN physiological_output_type USING (PhysiologicalOutputTypeID) | ||
LEFT JOIN Project ON ppf.ProjectID = Project.ProjectID | ||
WHERE ( | ||
ParameterTypeID = ( | ||
SELECT ParameterTypeID | ||
FROM parameter_type | ||
WHERE Name = 'RecordingDuration' | ||
) | ||
) | ||
-- AND OutputTypeName = 'raw' | ||
AND Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE TABLE Login_Summary_Statistics ( | ||
Title VARCHAR(255), | ||
Project VARCHAR(255), | ||
Value INT, | ||
QueryOrder INT, | ||
PRIMARY KEY (Title, Project) | ||
); | ||
|
||
ALTER TABLE dataquery_study_queries_rel | ||
MODIFY COLUMN PinType enum('topquery','dashboard', 'loginpage') DEFAULT NULL; | ||
|
||
ALTER TABLE Project | ||
ADD COLUMN showSummaryOnLogin BOOLEAN DEFAULT TRUE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.