@@ -118,62 +118,61 @@ module.exports = {
118
118
const currSectionData = currCourse . section_data
119
119
for ( let k = 0 ; k < currSectionData . length ; ++ k ) {
120
120
const currData = currSectionData [ k ]
121
- // Only show classes without a special meeting code (i.e. 'FI', 'PB', etc)
122
- if ( currData . special_mtg_code === '' ) {
123
- // time format is HH:MM - HH:MM
124
- // split time string and get seconds
125
- const timeString = currData . time
126
- let startSeconds ,
127
- endSeconds ,
128
- formattedTimeString ,
129
- formattedStartString
130
-
131
- if ( timeString ) {
132
- const timeArr = timeString . split ( ' ' )
133
- const startString = timeArr [ 0 ]
134
- const endString = timeArr [ 2 ]
135
- const startArr = startString . split ( ':' ) // split it at the colons
136
- const endArr = endString . split ( ':' ) // split it at the colons
137
- // minutes are worth 60 seconds. Hours are worth 60 minutes.
138
- startSeconds = ( + startArr [ 0 ] * 60 * 60 ) + ( + startArr [ 1 ] * 60 )
139
- endSeconds = ( + endArr [ 0 ] * 60 * 60 ) + ( + endArr [ 1 ] * 60 )
140
- const startMoment = moment ( startString , 'HH:mm' )
141
- const endMoment = moment ( endString , 'HH:mm' )
142
- const startAm = Boolean ( startMoment . format ( 'a' ) === 'am' )
143
- const endAm = Boolean ( endMoment . format ( 'a' ) === 'am' )
144
- formattedStartString = moment ( startString , 'HH:mm' ) . format ( 'h:mm' ) +
145
- ( startAm ? ( ' a.m.' ) : ( ' p.m.' ) )
146
- const formattedEndString = moment ( endString , 'HH:mm' ) . format ( 'h:mm' ) +
147
- ( endAm ? ( ' a.m.' ) : ( ' p.m.' ) )
148
- formattedTimeString = formattedStartString +
149
- ' – ' + formattedEndString
150
- }
151
-
152
- let day = 'OTHER'
153
- if ( currData . days ) {
154
- day = currData . days
155
- }
156
-
157
- const item = {
158
- building : currData . building ,
159
- room : currData . room ,
160
- instructor_name : currData . instructor_name ,
161
- section : currData . section ,
162
- subject_code : currCourse . subject_code ,
163
- course_code : currCourse . course_code ,
164
- course_title : currCourse . course_title ,
165
- time_string : formattedTimeString ,
166
- start_string : formattedStartString ,
167
- start_time : startSeconds ,
168
- end_time : endSeconds ,
169
- meeting_type : currData . meeting_type ,
170
- special_mtg_code : currData . special_mtg_code ,
171
- day_code : currData . days ,
172
- grade_option : currCourse . grade_option
173
- }
174
-
175
- courseItems [ day ] . push ( item )
121
+
122
+ // if (currData.special_mtg_code === '') {
123
+ // time format is HH:MM - HH:MM
124
+ // split time string and get seconds
125
+ const timeString = currData . time
126
+ let startSeconds ,
127
+ endSeconds ,
128
+ formattedTimeString ,
129
+ formattedStartString
130
+
131
+ if ( timeString ) {
132
+ const timeArr = timeString . split ( ' ' )
133
+ const startString = timeArr [ 0 ]
134
+ const endString = timeArr [ 2 ]
135
+ const startArr = startString . split ( ':' ) // split it at the colons
136
+ const endArr = endString . split ( ':' ) // split it at the colons
137
+ // minutes are worth 60 seconds. Hours are worth 60 minutes.
138
+ startSeconds = ( + startArr [ 0 ] * 60 * 60 ) + ( + startArr [ 1 ] * 60 )
139
+ endSeconds = ( + endArr [ 0 ] * 60 * 60 ) + ( + endArr [ 1 ] * 60 )
140
+ const startMoment = moment ( startString , 'HH:mm' )
141
+ const endMoment = moment ( endString , 'HH:mm' )
142
+ const startAm = Boolean ( startMoment . format ( 'a' ) === 'am' )
143
+ const endAm = Boolean ( endMoment . format ( 'a' ) === 'am' )
144
+ formattedStartString = moment ( startString , 'HH:mm' ) . format ( 'h:mm' ) +
145
+ ( startAm ? ( ' a.m.' ) : ( ' p.m.' ) )
146
+ const formattedEndString = moment ( endString , 'HH:mm' ) . format ( 'h:mm' ) +
147
+ ( endAm ? ( ' a.m.' ) : ( ' p.m.' ) )
148
+ formattedTimeString = formattedStartString +
149
+ ' – ' + formattedEndString
150
+ }
151
+
152
+ let day = 'OTHER'
153
+ if ( currData . days ) {
154
+ day = currData . days
176
155
}
156
+
157
+ const item = {
158
+ building : currData . building ,
159
+ room : currData . room ,
160
+ instructor_name : currData . instructor_name ,
161
+ section : currData . section ,
162
+ subject_code : currCourse . subject_code ,
163
+ course_code : currCourse . course_code ,
164
+ course_title : currCourse . course_title ,
165
+ time_string : formattedTimeString ,
166
+ start_string : formattedStartString ,
167
+ start_time : startSeconds ,
168
+ end_time : endSeconds ,
169
+ meeting_type : currData . meeting_type ,
170
+ special_mtg_code : currData . special_mtg_code ,
171
+ day_code : currData . days ,
172
+ grade_option : currCourse . grade_option
173
+ }
174
+
175
+ courseItems [ day ] . push ( item )
177
176
}
178
177
}
179
178
0 commit comments