diff --git a/apps/src/sites/code.org/pages/public/teacher-dashboard/index.js b/apps/src/sites/code.org/pages/public/teacher-dashboard/index.js index c53d45722fe91..6f059e7bcff3c 100644 --- a/apps/src/sites/code.org/pages/public/teacher-dashboard/index.js +++ b/apps/src/sites/code.org/pages/public/teacher-dashboard/index.js @@ -410,7 +410,7 @@ function main() { firehoseClient.putRecord( { study: 'teacher-dashboard', - study_group: 'control', + study_group: 'react', event: 'stats' } ); @@ -436,7 +436,7 @@ function main() { firehoseClient.putRecord( { study: 'teacher-dashboard', - study_group: 'control', + study_group: 'react', event: 'manage' } ); @@ -651,7 +651,7 @@ function main() { firehoseClient.putRecord( { study: 'teacher-dashboard', - study_group: 'control', + study_group: 'react', event: 'projects' } ); @@ -695,7 +695,7 @@ function main() { firehoseClient.putRecord( { study: 'teacher-dashboard', - study_group: 'control', + study_group: experiments.isEnabled(experiments.TEACHER_EXP_2018) ? 'react' : 'angular', event: 'progress-summary' } ); @@ -732,7 +732,7 @@ function main() { firehoseClient.putRecord( { study: 'teacher-dashboard', - study_group: 'control', + study_group: 'angular', event: 'progress-detailed' } ); @@ -744,7 +744,7 @@ function main() { firehoseClient.putRecord( { study: 'teacher-dashboard', - study_group: 'control', + study_group: 'angular', event: 'progress-summary' } ); @@ -892,7 +892,7 @@ function main() { firehoseClient.putRecord( { study: 'teacher-dashboard', - study_group: 'control', + study_group: experiments.isEnabled(experiments.TEACHER_EXP_2018) ? 'react' : 'angular', event: 'text-responses' } ); @@ -982,7 +982,7 @@ function main() { firehoseClient.putRecord( { study: 'teacher-dashboard', - study_group: 'control', + study_group: experiments.isEnabled(experiments.TEACHER_EXP_2018) ? 'react' : 'angular', event: 'assessments' } ); diff --git a/apps/src/templates/sectionProgress/SectionProgressToggle.jsx b/apps/src/templates/sectionProgress/SectionProgressToggle.jsx index 6c1a4b344f186..4c6cc280156c0 100644 --- a/apps/src/templates/sectionProgress/SectionProgressToggle.jsx +++ b/apps/src/templates/sectionProgress/SectionProgressToggle.jsx @@ -4,6 +4,7 @@ import color from "@cdo/apps/util/color"; import FontAwesome from '@cdo/apps/templates/FontAwesome'; import { connect } from 'react-redux'; import {setCurrentView, ViewType} from './sectionProgressRedux'; +import firehoseClient from '@cdo/apps/lib/util/firehose'; const styles = { toggleButton: { @@ -40,12 +41,26 @@ class SectionProgressToggle extends React.Component { // Timeouts forces a render of the local state before dispatching // the action. if (this.state.selectedToggle === ViewType.SUMMARY) { + firehoseClient.putRecord( + { + study: 'teacher-dashboard', + study_group: 'react', + event: 'progress-detail' + } + ); this.setState({selectedToggle: ViewType.DETAIL}, () => { setTimeout(() => { this.props.setCurrentView(ViewType.DETAIL); }, 0); }); } else { + firehoseClient.putRecord( + { + study: 'teacher-dashboard', + study_group: 'react', + event: 'progress-summary' + } + ); this.setState({selectedToggle: ViewType.SUMMARY}, () => { setTimeout(() => { this.props.setCurrentView(ViewType.SUMMARY);