Repository navigation
feat(TeacherPresentation): Add event logging - #2361
Merged
Merged
Conversation
…og open and close events
…d in teacherDataService
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (3)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
Member
Author
|
🎉 This PR is included in version 5.249.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR adds event logging for teacher interactions with the newly introduced Teacher Presentation and Ideas Summary displays in the Classroom Monitor. These logs enable researchers to study how teachers navigate, curate, and orchestrate whole-class discussions and review student ideas.
In addition, this PR fixes an issue where
periodIdandcomponentTypewere not being populated on teacher event rows in the database.Key Changes
Teacher Data Service (
TeacherDataService)periodId: this.getCurrentPeriodId()andcomponentTypeinsaveEvent()payload so that events are attributed with the active class period and target component type.getCurrentPeriodId()(this.currentPeriod?.periodId).Component Summary Expansion (
ComponentSummaryComponent)LargeSummaryViewOpenedwhen the maximize button is clicked on summary cards.LargeSummaryViewClosedwithdurationMswhen the expanded dialog is closed.Teacher Presentation View (
TeacherPresentationButtonComponent)TeacherDataServiceto track presentation launches.getSelectionCounts()to calculate selection counts appropriately based on presentation type:totalIdeasSelectedandtotalResponsesSelected.totalResponsesSelected(selected posts/comments).TeacherPresentationOpenedwith the activeperiodIdand selection counts.TeacherPresentationClosedwithperiodIdanddurationMsupon dialog closure.Ideas Summary Interactions (
IdeasSummaryComponent)IdeasSummaryRowToggledwhen an idea category row is expanded or collapsed, includingideaId,expanded,studentCount, andisUnique.IdeasSummarySortChangedwithcolumnanddirection(asc/desc) when sorting by idea text or student count.IdeasSummaryFilterChangedwithqueryandresultCountusing a 2-second debounce to prevent network request spamming during typing.OnDestroyto clean up RxJS subscriptions.Events Summary
All events are recorded via
TeacherDataService.saveEvent(context, nodeId, componentId, componentType, category, eventName, data):dataPayloadTeacherPresentationOpened'TeacherPresentation'{ periodId: 1, totalIdeasSelected: 2, totalResponsesSelected: 5 }(Ideas){ periodId: 1, totalResponsesSelected: 3 }(Discussion)TeacherPresentationClosed'TeacherPresentation'{ periodId: 1, durationMs: 142000 }LargeSummaryViewOpened'TeacherSummary'{ type: 'ideas' }LargeSummaryViewClosed'TeacherSummary'{ type: 'ideas', durationMs: 45000 }IdeasSummaryRowToggled'TeacherSummary'{ ideaId: 'idea_1', expanded: true, studentCount: 6, isUnique: false }IdeasSummarySortChanged'TeacherSummary'{ column: 'count', direction: 'desc' }IdeasSummaryFilterChanged'TeacherSummary'{ query: 'energy', resultCount: 3 }Manual Tests
Automated Testing
component-summary.component.spec.ts: VerifiesLargeSummaryViewOpenedandLargeSummaryViewClosedwithdurationMs.teacher-presentation-button.component.spec.ts: VerifiesTeacherPresentationOpened(for both Ideas and Discussion selection counts) andTeacherPresentationClosed.ideas-summary.component.spec.ts: VerifiesIdeasSummaryRowToggled,IdeasSummarySortChanged, and debouncedIdeasSummaryFilterChanged.