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

Record lesson id when announcement is clicked on lesson plan #40079

Merged
merged 5 commits into from Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/src/templates/Notification.jsx
Expand Up @@ -201,7 +201,7 @@ class Notification extends Component {
// Our firehose logging system has standalone fields for commonly used metadata (eg, user_id).
// Here, we separate out those fields from any other analytics data provided in the firehoseAnalyticsData prop.
// We include these properties in the data_json object as well, in case that is easier for our product team to use.
['user_id', 'script_id'].forEach(firehoseMetadataKey => {
['user_id', 'script_id', 'lesson_id'].forEach(firehoseMetadataKey => {
if (firehoseMetadataKey in firehoseAnalyticsData) {
record[firehoseMetadataKey] =
firehoseAnalyticsData[firehoseMetadataKey];
Expand All @@ -220,7 +220,7 @@ class Notification extends Component {
})
};

firehoseClient.putRecord(record);
firehoseClient.putRecord(record, {includeUserId: true});
}
if (this.props.onButtonClick) {
this.props.onButtonClick();
Expand Down
3 changes: 3 additions & 0 deletions apps/src/templates/lessonOverview/LessonOverview.jsx
Expand Up @@ -155,6 +155,9 @@ class LessonOverview extends Component {
announcements={announcements}
width={styleConstants['content-width']}
viewAs={viewAs}
firehoseAnalyticsData={{
lesson_id: lesson.id
}}
/>
)}
{displayVerifiedResourcesNotification && (
Expand Down