File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
dashboard/app/controllers/pd/application Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,14 @@ import Section3TeachingBackground from './Section3TeachingBackground';
6
6
import Section4ProfessionalLearningProgramRequirements from './Section4ProfessionalLearningProgramRequirements' ;
7
7
import Section5AdditionalDemographicInformation from './Section5AdditionalDemographicInformation' ;
8
8
import Section6Submission from './Section6Submission' ;
9
+ import firehoseClient from "@cdo/apps/lib/util/firehose" ;
9
10
/* global ga */
10
11
11
12
export default class Teacher1920Application extends FormController {
12
13
static propTypes = {
13
14
...FormController . propTypes ,
14
- accountEmail : PropTypes . string . isRequired
15
+ accountEmail : PropTypes . string . isRequired ,
16
+ userId : PropTypes . number . isRequired
15
17
} ;
16
18
17
19
static submitButtonText = "Complete and Send" ;
@@ -42,6 +44,21 @@ export default class Teacher1920Application extends FormController {
42
44
} ;
43
45
}
44
46
47
+ /**
48
+ * @override
49
+ */
50
+ onInitialize ( ) {
51
+ // Log the user ID to firehose.
52
+ firehoseClient . putRecord (
53
+ {
54
+ userId : this . props . userId ,
55
+ study : 'application-funnel' ,
56
+ event : 'started-teacher1920-application'
57
+ } ,
58
+ { includeUserId : false }
59
+ ) ;
60
+ }
61
+
45
62
/**
46
63
* @override
47
64
*/
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ export default class FormController extends React.Component {
49
49
this . handleSubmit = this . handleSubmit . bind ( this ) ;
50
50
this . nextPage = this . nextPage . bind ( this ) ;
51
51
this . prevPage = this . prevPage . bind ( this ) ;
52
+
53
+ this . onInitialize ( ) ;
52
54
}
53
55
54
56
componentWillMount ( ) {
@@ -167,6 +169,13 @@ export default class FormController extends React.Component {
167
169
} ;
168
170
}
169
171
172
+ /**
173
+ * Called when we initialize the form.
174
+ */
175
+ onInitialize ( ) {
176
+ // Intentional noop; overridden by child classes
177
+ }
178
+
170
179
/**
171
180
* Called when we get a successful response from the API submission
172
181
*/
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ def new
23
23
options : TEACHER_APPLICATION_CLASS . options . camelize_keys ,
24
24
requiredFields : TEACHER_APPLICATION_CLASS . camelize_required_fields ,
25
25
accountEmail : current_user . email ,
26
- apiEndpoint : '/api/v1/pd/application/teacher'
26
+ apiEndpoint : '/api/v1/pd/application/teacher' ,
27
+ userId : current_user . id
27
28
} . to_json
28
29
}
29
30
end
You can’t perform that action at this time.
0 commit comments