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

Bug: Instructor dashboard enrollments exclude current day #246

Closed
bmtcril opened this issue Aug 2, 2023 · 2 comments · Fixed by #271
Closed

Bug: Instructor dashboard enrollments exclude current day #246

bmtcril opened this issue Aug 2, 2023 · 2 comments · Fixed by #271

Comments

@bmtcril
Copy link
Contributor

bmtcril commented Aug 2, 2023

Currently the default instructor dashboard filter is for the last month, but it ends that month at midnight of the current day:

SELECT toStartOfDay(toDateTime(`enrollment_status_date`)) AS `__timestamp`,
       count(*) AS `count`
FROM
...
WHERE `enrollment_status_date` >= '2023-08-01'
  AND `enrollment_status_date` < '2023-08-03'
  AND `org` IN ('UMONTREAL')
  AND `enrollment_status` = 'registered'
GROUP BY toStartOfDay(toDateTime(`enrollment_status_date`))
LIMIT 100000;

This is going to be confusing to instructors and cause a lot of issues on launch day of their course, when they most want to watch enrollments. We should find a way to make this inclusive in the same way that the other enrollment charts are.

@SoryRawyer
Copy link
Contributor

I think we can address this by using a "custom" time filter and setting the end of the window to one day after the current time. Does it make sense to leave the time frame start date as 1 month ago, or is there a better default value?

@bmtcril
Copy link
Contributor Author

bmtcril commented Aug 2, 2023

That makes sense to me

SoryRawyer added a commit to SoryRawyer/tutor-contrib-aspects that referenced this issue Aug 3, 2023
This addresses openedx#246. The query for `fact_enrollments_by_day` is also
updated to extend current enrollment status to tomorrow so that the
current days' enrollment status is included, which in turn makes the
enrollment status available for the chart.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment