fix(analytics): show per-student last seen from login and session activity (#674)
* fix(analytics): show per-student last seen from login and session activity Return ISO last-seen timestamps from course analytics instead of pre-formatted strings so the dashboard can format them per student. Batch-fetch last seen for all students and include session activity alongside login events for more accurate, distinct values. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(analytics): destructure first row from getLastLogin query results Promise.all returns an array per Drizzle select; nested destructuring is required so loggedInAt and updatedAt are read from row objects. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>
This commit is contained in:
co-authored by
Rotimi Best
Cursor Agent
parent
bbdb2e9419
commit
f2d7afc590
@@ -21,7 +21,7 @@ export interface StudentOverview {
|
||||
exercisesSubmitted: number;
|
||||
totalExercises: number;
|
||||
averageGrade: number;
|
||||
lastSeen: string;
|
||||
lastSeen: string | undefined;
|
||||
progressPercentage: number;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user