-
Notifications
You must be signed in to change notification settings - Fork 137
Enhanced Tutor Times Dashboard with Summary Cards and Activity Charts #444
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
base: 10.0.x
Are you sure you want to change the base?
Enhanced Tutor Times Dashboard with Summary Cards and Activity Charts #444
Conversation
…nd activity trend visuals
|
This is a really solid improvement. The summary cards make the data much easier to read and the layout feels clearer and more useful than the previous timetable-style view. The new calculations for total time, assessments, average minutes per assessment and submissions viewed all make sense, and it’s nice to see edge cases handled (like showing 0 instead of NaN when there’s no data). The date range logic and daily grouping also look well especially including days with zero activity. I also liked the cleanup of not used imports. I don’t see anything blocking here. |
JeffySam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a strong and well-thought-out enhancement to the Tutor Analytics view. The shift from a timetable-style calendar to a dashboard-style layout significantly improves readability and usefulness, especially for quickly understanding workload and marking efficiency.
The use of the backend-calculated duration_minutes is a solid architectural decision. Offloading time calculations to the API simplifies the frontend logic, reduces unnecessary client-side computation, and makes the analytics more reliable overall. The summary metrics (total time, assessments made, average minutes per assessment, and submissions viewed) are clear, intuitive, and aligned with what tutors would actually want to see at a glance.
The trend chart is a great addition. Grouping by day and explicitly including zero-activity days makes the data far more honest and easier to interpret over time. Handling edge cases—such as displaying 0 instead of NaN when no assessments exist—shows good defensive thinking and attention to detail.
I also appreciated the general cleanup in this PR: unused imports removed, lint passing cleanly, and the fact that this now uses the real GRAPE endpoint instead of dummy data makes it production-ready. The dependency addition (ngx-charts) feels justified and well-contained.
ishika021
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very good enhancement to the Tutor Analytics view because of its solid and well-structured design. By changing the existing timetable-style layout to a dashboard with summary cards and trend charts, the Tutor Analytics view has become significantly easier to read and provides greater analytical value.
The new analytical layout allows tutors to quickly see their overall marking activity and track trends over time, rather than having to interpret lists of raw sessions.
Choosing to use duration_minutes values from the backend, rather than calculating session lengths on the frontend, is a strong design decision for the Tutor Analytics views. This choice reduces the amount of duplicated logic between the frontend and the backend, ensures consistency in data across different client applications, and reduces the complexity of the front-end code. Using backend values also provides increased robustness for the Tutor Analytics views as the way marking sessions are recorded may change in the future.
It seems that careful consideration has been given to handling edge cases in regards to the design of the Tutor Analytics dashboard. For example, defaulting to a value of zero. The summary metrics and explicitly including days with no activity in the dashboard chart allows the dashboards to be stable and easily interpreted, even if a tutor has very few or irregular activity in the system. Thoughtful consideration of such details improves the accuracy and reliability of analytics-based views.
I think @swimlane/ngx-charts make sense in this context since they provide value to the dashboard without cluttering the UI. They appear easy to implement, and the analytics components appear organized and self-contained. I feel that the changes in this implementation are easy to track in terms of maintainability and are consistent with existing Angular patterns in the codebase.
I do not see any structural or architectural issues with this implementation. It is complete and ready to use.
Rana7xi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really solid improvement. The summary cards make the data much easier to read and the layout feels clearer and more useful than the previous timetable-style view. The new calculations for total time, assessments, average minutes per assessment and submissions viewed all make sense, and it’s nice to see edge cases handled (like showing 0 instead of NaN when there’s no data). The date range logic and daily grouping also look well especially including days with zero activity. I also liked the cleanup of not used imports. I don’t see anything blocking here.
03e4acf to
df99b67
Compare
BrianDangDev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved please open a upstream PR, remember to cross reference with the backend upsteam PR
Description
This PR enhances the Tutor Analytics view, transforming it from a calendar timetable for a selected period into a comprehensive data dashboard. It uses the recently added duration_minutes backend logic to provide summary insights and trend charts into the marking session efficiency and workload.
Key Motivations:
session_tracker.rband schema from Refactor and Finalize Session Tracking (Building on closed unmerged #74) doubtfire-api#83By utilizing the backend-calculated
duration_minutes, the frontend no longer needs to perform time-delta calculations, so its only filter logic and O(n) calcs in the frontend.The 10.0.x branch only contained the option to download sessions and view the session timetable. Grouped bar charts now make it easy to compare time spent and tasks assessed trends over time.
Summary tiles provide visibility to metrics like total hours, submissions opened, assessments made and average minutes per assessment.
Dependencies:
@swimlane/ngx-charts (v20.5.0)for data visualization.Type of change
How Has This Been Tested?
Production build:
ng build --configuration productionpasses (AOT-safe)Linting:
npm run lintpasses (fixed any usage and unused imports)Date ranges: Custom ranges correctly include every day, even with zero activity
Zero safety: Efficiency shows 0 instead of NaN when no assessments exist
Filtering: Selecting a tutor updates both summary cards and charts
Testing Checklist:
Checklist: