Skip to content
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

Learning Insights Metrics Fix #683

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

corypride
Copy link
Contributor

@corypride corypride commented Jan 21, 2025

Description of the change

Address inconsistencies in calculations and formulas on the Learning Insights Dashboard

Screenshot(s)

refactorInsights.mp4

Additional context

@corypride corypride added bug Something isn't working refactor - backend labels Jan 21, 2025
@corypride corypride self-assigned this Jan 21, 2025
@corypride corypride force-pushed the fix-learning-insights-metrics branch from e02f2fc to 57865f7 Compare January 24, 2025 15:29
@corypride corypride marked this pull request as ready for review January 24, 2025 15:31
@@ -180,16 +181,14 @@ func (db *DB) GetAdminDashboardInfo(facilityID uint) (models.AdminDashboardJoin,
}
func (db *DB) GetTotalCoursesOffered(facilityID *uint) (int, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed on slack.. since courses are not unique to a facility, should we remove the option to filter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Should i still log the FacilityID value here?

Select("COUNT(DISTINCT ue.user_id) AS students_enrolled").
Joins("INNER JOIN users u on ue.user_id = u.id")

Select(`COUNT(DISTINCT u.id) AS num_enrolled`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (and others I see) on the other hand, since we are filtering the students themselves by facility, or getting the amount of time from students in a facility, then that makes sense

@corypride corypride force-pushed the fix-learning-insights-metrics branch from f2d6a99 to dfce654 Compare January 27, 2025 16:39
@corypride corypride marked this pull request as draft January 27, 2025 16:52
@corypride corypride force-pushed the fix-learning-insights-metrics branch from 16d7555 to dfce654 Compare January 29, 2025 16:27
if err != nil {
log.add("facilityId", claims.FacilityID)
log.add("facility_id", claims.FacilityID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just add the facility_id to the log once at the top, so we don't add it every time there's an error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactor - backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Mismatched Metrics and Incorrect Completion Rates on Learning Insights
2 participants