@@ -10,22 +10,40 @@ import {
10
10
import { AdvisorGroup } from '../../tools/advisors/types' ;
11
11
import { lastNameRange , lastNameRanges } from '../../tools/advisors/checkers' ;
12
12
13
- const engineeringLiberalArtsDistributions : readonly string [ ] = [
14
- 'CA' ,
15
- 'HA' ,
16
- 'LA' ,
17
- 'LAD' ,
18
- 'KCM' ,
19
- 'SBA' ,
20
- 'FL' ,
21
- 'CE' ,
22
- 'ALC' ,
23
- 'SCD' ,
24
- 'HST' ,
25
- 'ETM' ,
26
- 'SSC' ,
27
- 'GLC' ,
28
- ] ;
13
+ const engineeringLiberalArtsGroups : string [ ] [ ] = Object . values ( {
14
+ 'Group 1' : [
15
+ 'CA-AAP' ,
16
+ 'CA-AG' ,
17
+ 'CA-AS' ,
18
+ 'CA-HE' ,
19
+ 'LA-AAP' ,
20
+ 'LA-AG' ,
21
+ 'LA-AS' ,
22
+ 'LAD-HE' ,
23
+ 'ALC-AAP' ,
24
+ 'ALC-AS' ,
25
+ 'ALC-HA' ,
26
+ 'SCD-AAP' ,
27
+ 'SCD-AS' ,
28
+ 'SCD-HA' ,
29
+ ] ,
30
+ 'Group 2' : [ 'HA-AAP' , 'HA-AG' , 'HA-AS' , 'HA-HE' , 'HST-AAP' , 'HST-AS' , 'HST-HA' ] ,
31
+ 'Group 3' : [ 'KCM-AAP' , 'KCM-AG' , 'KCM-AS' , 'KCM-HE' , 'ETM-AAP' , 'ETM-AS' , 'ETM-HA' ] ,
32
+ 'Group 4' : [
33
+ 'SBA-AAP' ,
34
+ 'SBA-AG' ,
35
+ 'SBA-AS' ,
36
+ 'SBA-HE' ,
37
+ 'SSC-AAP' ,
38
+ 'SSC-AS' ,
39
+ 'SSC-HA' ,
40
+ 'GLC-AAP' ,
41
+ 'GLC-AS' ,
42
+ 'GLC-HA' ,
43
+ ] ,
44
+ 'Group 5' : [ 'FL-AAP' , 'FL-AG' ] ,
45
+ 'Group 6' : [ 'CE-EN' ] ,
46
+ } ) ;
29
47
30
48
const engineeringRequirements : readonly CollegeOrMajorRequirement [ ] = [
31
49
{
@@ -111,37 +129,30 @@ const engineeringRequirements: readonly CollegeOrMajorRequirement[] = [
111
129
'https://www.engineering.cornell.edu/students/undergraduate-students/advising/liberal-studies' ,
112
130
checker : [
113
131
( course : Course ) : boolean =>
114
- engineeringLiberalArtsDistributions . some (
115
- distribution => hasCategory ( course , distribution ) ?? false
132
+ engineeringLiberalArtsGroups . some ( group =>
133
+ group . some ( distribution => hasCategory ( course , distribution ) ?? false )
116
134
) || courseIsForeignLang ( course ) ,
117
135
] ,
118
136
fulfilledBy : 'courses' ,
119
137
perSlotMinCount : [ 6 ] ,
120
138
slotNames : [ 'Course' ] ,
121
139
additionalRequirements : {
122
- 'Courses must be from 3 categories .' : {
140
+ 'Courses must be from 3 groups .' : {
123
141
checker : [
124
- ( course : Course ) : boolean =>
125
- ( course . catalogDistr ?. includes ( 'LA' ) || course . catalogDistr ?. includes ( 'LAD' ) ) ?? false ,
126
- ...engineeringLiberalArtsDistributions
127
- . filter ( it => it !== 'LA' && it !== 'LAD' )
128
- . map ( distribution => ( course : Course ) : boolean =>
129
- hasCategory ( course , distribution ) ?? false
130
- ) ,
142
+ ...engineeringLiberalArtsGroups . map ( group => ( course : Course ) : boolean =>
143
+ group . some ( distribution => hasCategory ( course , distribution ) ?? false )
144
+ ) ,
131
145
] ,
132
146
fulfilledBy : 'courses' ,
133
- perSlotMinCount : [ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ] ,
134
- slotNames : [
135
- 'LA' ,
136
- ...engineeringLiberalArtsDistributions . filter ( it => it !== 'LA' && it !== 'LAD' ) ,
137
- ] ,
147
+ perSlotMinCount : [ 1 , 1 , 1 , 1 , 1 , 1 ] ,
148
+ slotNames : [ 'Group 1' , 'Group 2' , 'Group 3' , 'Group 4' , 'Group 5' , 'Group 6' ] ,
138
149
minNumberOfSlots : 3 ,
139
150
} ,
140
151
'Courses must have at least 18 credits.' : {
141
152
checker : [
142
153
( course : Course ) : boolean =>
143
- engineeringLiberalArtsDistributions . some (
144
- distribution => hasCategory ( course , distribution ) ?? false
154
+ engineeringLiberalArtsGroups . some ( group =>
155
+ group . some ( distribution => hasCategory ( course , distribution ) ?? false )
145
156
) || courseIsForeignLang ( course ) ,
146
157
] ,
147
158
fulfilledBy : 'credits' ,
@@ -153,8 +164,8 @@ const engineeringRequirements: readonly CollegeOrMajorRequirement[] = [
153
164
const { catalogNbr } = course ;
154
165
return (
155
166
! ifCodeMatch ( catalogNbr , '1***' ) &&
156
- ( engineeringLiberalArtsDistributions . some (
157
- category => hasCategory ( course , category ) ?? false
167
+ ( engineeringLiberalArtsGroups . some ( group =>
168
+ group . some ( distribution => hasCategory ( course , distribution ) ?? false )
158
169
) ||
159
170
courseIsForeignLang ( course ) )
160
171
) ;
0 commit comments