@@ -290,14 +290,9 @@ class WorkloadSummaryActions {
290
290
courses . ids . forEach ( function ( courseId ) {
291
291
var course = courses . list [ courseId ] ;
292
292
course . census = [ ] ;
293
- var SNAPSHOT_CODE = "CURRENT" ;
294
293
295
294
DwService . getDwCensusData ( course . subjectCode , course . courseNumber ) . then ( function ( courseCensus ) {
296
- courseCensus . forEach ( function ( census ) {
297
- if ( census . snapshotCode === SNAPSHOT_CODE ) {
298
- course . census . push ( census ) ;
299
- }
300
- } ) ;
295
+ course . census = courseCensus ;
301
296
} ) ;
302
297
} ) ;
303
298
@@ -1050,7 +1045,6 @@ class WorkloadSummaryActions {
1050
1045
}
1051
1046
} ) ;
1052
1047
1053
- var SNAPSHOT_CODE = "CURRENT" ;
1054
1048
var termCodes = this . _getScheduleTermCodes ( isPreviousYear ) ;
1055
1049
var subjectCodes = this . _getScheduleSubjectCodes ( ) ;
1056
1050
var openCalls = WorkloadSummaryReducers . _state . calculations . dwCallsOpened ;
@@ -1062,31 +1056,29 @@ class WorkloadSummaryActions {
1062
1056
1063
1057
DwService . getDwCensusData ( subjectCode , null , termCode ) . then ( function ( censusSections ) {
1064
1058
censusSections . forEach ( function ( censusSection ) {
1065
- if ( censusSection . snapshotCode == SNAPSHOT_CODE ) {
1066
- var censusSectionGroupKey = censusSection . subjectCode + censusSection . courseNumber + sequenceNumberToPattern ( censusSection . sequenceNumber ) + TermService . termCodeToTerm ( censusSection . termCode ) ;
1067
-
1068
- WorkloadSummaryReducers . _state . sectionGroups . ids . forEach ( function ( sectionGroupId ) {
1069
- var sectionGroup = WorkloadSummaryReducers . _state . sectionGroups . list [ sectionGroupId ] ;
1070
- var course = WorkloadSummaryReducers . _state . courses . list [ sectionGroup . courseId ] ;
1071
- var sectionGroupUniqueKey = course . subjectCode + course . courseNumber + course . sequencePattern + TermService . termCodeToTerm ( sectionGroup . termCode ) ;
1072
-
1073
- sectionGroup . maxEnrollment = sectionGroup . maxEnrollment || 0 ;
1074
- sectionGroup . actualEnrollment = sectionGroup . actualEnrollment || 0 ;
1075
- sectionGroup . previousEnrollment = sectionGroup . previousEnrollment || 0 ;
1076
-
1077
- if ( sectionGroupUniqueKey == censusSectionGroupKey ) {
1078
- if ( isPreviousYear ) {
1079
- sectionGroup . previousEnrollment += censusSection . currentEnrolledCount ;
1080
- } else {
1081
- sectionGroup . actualEnrollment += censusSection . currentEnrolledCount ;
1082
- sectionGroup . maxEnrollment = 0 ;
1083
- _self . _getSectionsForSectionGroup ( sectionGroup ) . forEach ( function ( section ) {
1084
- sectionGroup . maxEnrollment += section . seats ;
1085
- } ) ;
1086
- }
1059
+ var censusSectionGroupKey = censusSection . subjectCode + censusSection . courseNumber + sequenceNumberToPattern ( censusSection . sequenceNumber ) + TermService . termCodeToTerm ( censusSection . termCode ) ;
1060
+
1061
+ WorkloadSummaryReducers . _state . sectionGroups . ids . forEach ( function ( sectionGroupId ) {
1062
+ var sectionGroup = WorkloadSummaryReducers . _state . sectionGroups . list [ sectionGroupId ] ;
1063
+ var course = WorkloadSummaryReducers . _state . courses . list [ sectionGroup . courseId ] ;
1064
+ var sectionGroupUniqueKey = course . subjectCode + course . courseNumber + course . sequencePattern + TermService . termCodeToTerm ( sectionGroup . termCode ) ;
1065
+
1066
+ sectionGroup . maxEnrollment = sectionGroup . maxEnrollment || 0 ;
1067
+ sectionGroup . actualEnrollment = sectionGroup . actualEnrollment || 0 ;
1068
+ sectionGroup . previousEnrollment = sectionGroup . previousEnrollment || 0 ;
1069
+
1070
+ if ( sectionGroupUniqueKey == censusSectionGroupKey ) {
1071
+ if ( isPreviousYear ) {
1072
+ sectionGroup . previousEnrollment += censusSection . currentEnrolledCount ;
1073
+ } else {
1074
+ sectionGroup . actualEnrollment += censusSection . currentEnrolledCount ;
1075
+ sectionGroup . maxEnrollment = 0 ;
1076
+ _self . _getSectionsForSectionGroup ( sectionGroup ) . forEach ( function ( section ) {
1077
+ sectionGroup . maxEnrollment += section . seats ;
1078
+ } ) ;
1087
1079
}
1088
- } ) ;
1089
- }
1080
+ }
1081
+ } ) ;
1090
1082
} ) ;
1091
1083
1092
1084
completedCalls += 1 ;
0 commit comments