@@ -83,13 +83,17 @@ public static List<LetterSoundAssessmentEvent> extractLetterSoundAssessmentEvent
83
83
if (versionCode >= 3005009 ) {
84
84
// https://github.com/elimu-ai/analytics/releases/tag/3.5.9
85
85
86
- int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
87
- ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
88
- letterSoundAssessmentEvent .setResearchExperiment (researchExperiment );
89
-
90
- int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
91
- ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
92
- letterSoundAssessmentEvent .setExperimentGroup (experimentGroup );
86
+ if (StringUtils .isNotBlank (csvRecord .get ("research_experiment" ))) {
87
+ int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
88
+ ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
89
+ letterSoundAssessmentEvent .setResearchExperiment (researchExperiment );
90
+ }
91
+
92
+ if (StringUtils .isNotBlank (csvRecord .get ("experiment_group" ))) {
93
+ int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
94
+ ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
95
+ letterSoundAssessmentEvent .setExperimentGroup (experimentGroup );
96
+ }
93
97
}
94
98
95
99
String letterSoundLetters = csvRecord .get ("letter_sound_letters" );
@@ -156,14 +160,18 @@ public static List<LetterSoundLearningEvent> extractLetterSoundLearningEvents(Fi
156
160
157
161
if (versionCode >= 3005009 ) {
158
162
// https://github.com/elimu-ai/analytics/releases/tag/3.5.9
159
-
160
- int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
161
- ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
162
- letterSoundLearningEvent .setResearchExperiment (researchExperiment );
163
163
164
- int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
165
- ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
166
- letterSoundLearningEvent .setExperimentGroup (experimentGroup );
164
+ if (StringUtils .isNotBlank (csvRecord .get ("research_experiment" ))) {
165
+ int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
166
+ ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
167
+ letterSoundLearningEvent .setResearchExperiment (researchExperiment );
168
+ }
169
+
170
+ if (StringUtils .isNotBlank (csvRecord .get ("experiment_group" ))) {
171
+ int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
172
+ ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
173
+ letterSoundLearningEvent .setExperimentGroup (experimentGroup );
174
+ }
167
175
}
168
176
169
177
// TODO: letterSoundLetters
@@ -231,13 +239,17 @@ public static List<NumberLearningEvent> extractNumberLearningEvents(File csvFile
231
239
if (versionCode >= 3005009 ) {
232
240
// https://github.com/elimu-ai/analytics/releases/tag/3.5.9
233
241
234
- int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
235
- ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
236
- numberLearningEvent .setResearchExperiment (researchExperiment );
237
-
238
- int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
239
- ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
240
- numberLearningEvent .setExperimentGroup (experimentGroup );
242
+ if (StringUtils .isNotBlank (csvRecord .get ("research_experiment" ))) {
243
+ int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
244
+ ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
245
+ numberLearningEvent .setResearchExperiment (researchExperiment );
246
+ }
247
+
248
+ if (StringUtils .isNotBlank (csvRecord .get ("experiment_group" ))) {
249
+ int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
250
+ ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
251
+ numberLearningEvent .setExperimentGroup (experimentGroup );
252
+ }
241
253
}
242
254
243
255
Integer numberValue = Integer .valueOf (csvRecord .get ("number_value" ));
@@ -317,13 +329,17 @@ public static List<WordAssessmentEvent> extractWordAssessmentEvents(File csvFile
317
329
if (versionCode >= 3005009 ) {
318
330
// https://github.com/elimu-ai/analytics/releases/tag/3.5.9
319
331
320
- int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
321
- ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
322
- wordAssessmentEvent .setResearchExperiment (researchExperiment );
323
-
324
- int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
325
- ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
326
- wordAssessmentEvent .setExperimentGroup (experimentGroup );
332
+ if (StringUtils .isNotBlank (csvRecord .get ("research_experiment" ))) {
333
+ int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
334
+ ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
335
+ wordAssessmentEvent .setResearchExperiment (researchExperiment );
336
+ }
337
+
338
+ if (StringUtils .isNotBlank (csvRecord .get ("experiment_group" ))) {
339
+ int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
340
+ ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
341
+ wordAssessmentEvent .setExperimentGroup (experimentGroup );
342
+ }
327
343
}
328
344
329
345
String wordText = csvRecord .get ("word_text" );
@@ -396,13 +412,17 @@ public static List<WordLearningEvent> extractWordLearningEvents(File csvFile) {
396
412
if (versionCode >= 3005009 ) {
397
413
// https://github.com/elimu-ai/analytics/releases/tag/3.5.9
398
414
399
- int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
400
- ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
401
- wordLearningEvent .setResearchExperiment (researchExperiment );
402
-
403
- int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
404
- ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
405
- wordLearningEvent .setExperimentGroup (experimentGroup );
415
+ if (StringUtils .isNotBlank (csvRecord .get ("research_experiment" ))) {
416
+ int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
417
+ ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
418
+ wordLearningEvent .setResearchExperiment (researchExperiment );
419
+ }
420
+
421
+ if (StringUtils .isNotBlank (csvRecord .get ("experiment_group" ))) {
422
+ int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
423
+ ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
424
+ wordLearningEvent .setExperimentGroup (experimentGroup );
425
+ }
406
426
}
407
427
408
428
String wordText = csvRecord .get ("word_text" );
@@ -476,13 +496,17 @@ public static List<StoryBookLearningEvent> extractStoryBookLearningEvents(File c
476
496
if (versionCode >= 3005009 ) {
477
497
// https://github.com/elimu-ai/analytics/releases/tag/3.5.9
478
498
479
- int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
480
- ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
481
- storyBookLearningEvent .setResearchExperiment (researchExperiment );
482
-
483
- int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
484
- ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
485
- storyBookLearningEvent .setExperimentGroup (experimentGroup );
499
+ if (StringUtils .isNotBlank (csvRecord .get ("research_experiment" ))) {
500
+ int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
501
+ ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
502
+ storyBookLearningEvent .setResearchExperiment (researchExperiment );
503
+ }
504
+
505
+ if (StringUtils .isNotBlank (csvRecord .get ("experiment_group" ))) {
506
+ int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
507
+ ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
508
+ storyBookLearningEvent .setExperimentGroup (experimentGroup );
509
+ }
486
510
}
487
511
488
512
if (versionCode < 3003000 ) {
@@ -552,13 +576,17 @@ public static List<VideoLearningEvent> extractVideoLearningEvents(File csvFile)
552
576
if (versionCode >= 3005009 ) {
553
577
// https://github.com/elimu-ai/analytics/releases/tag/3.5.9
554
578
555
- int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
556
- ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
557
- videoLearningEvent .setResearchExperiment (researchExperiment );
558
-
559
- int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
560
- ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
561
- videoLearningEvent .setExperimentGroup (experimentGroup );
579
+ if (StringUtils .isNotBlank (csvRecord .get ("research_experiment" ))) {
580
+ int researchExperimentOrdinal = Integer .valueOf (csvRecord .get ("research_experiment" ));
581
+ ResearchExperiment researchExperiment = ResearchExperiment .values ()[researchExperimentOrdinal ];
582
+ videoLearningEvent .setResearchExperiment (researchExperiment );
583
+ }
584
+
585
+ if (StringUtils .isNotBlank (csvRecord .get ("experiment_group" ))) {
586
+ int experimentGroupOrdinal = Integer .valueOf (csvRecord .get ("experiment_group" ));
587
+ ExperimentGroup experimentGroup = ExperimentGroup .values ()[experimentGroupOrdinal ];
588
+ videoLearningEvent .setExperimentGroup (experimentGroup );
589
+ }
562
590
}
563
591
564
592
String videoTitle = csvRecord .get ("video_title" );
0 commit comments