Skip to content

Commit 556f310

Browse files
authoredNov 17, 2024··
Support ILR Econ Minor (#959)
* chore: add ilr minor * fix: update test cases * refactor: make college-specific minor name for ilr econ minor more consistent * chore: add note about study abroad exception * chore: update requirements json
1 parent 275203e commit 556f310

File tree

4 files changed

+326
-0
lines changed

4 files changed

+326
-0
lines changed
 

‎src/data/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ import mpaRequirements, { mpaAdvisors } from './grad/mpa';
8181

8282
import { MATH2940, CHEM2080 } from './specializations/en';
8383
import nsRequirements, { nsAdvisors } from './majors/ns';
84+
import econILRMinorRequirements, { econILRMinorAdvisors } from './minors/econILR';
8485

8586
const json: RequirementsJson = {
8687
university: {
@@ -529,6 +530,13 @@ const json: RequirementsJson = {
529530
advisors: eceMinorAdvisors,
530531
abbrev: 'ECE',
531532
},
533+
ECONILR: {
534+
name: 'Economics [ILR]',
535+
schools: ['IL'],
536+
requirements: econILRMinorRequirements,
537+
advisors: econILRMinorAdvisors,
538+
abbrev: 'EconILR',
539+
},
532540
GAMEDESIGN: {
533541
name: 'Game Design',
534542
schools: ['EN', 'AS1', 'AS2'],

‎src/data/minors/econILR.ts

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
import { CollegeOrMajorRequirement, Course } from '../../requirements/types';
2+
import {
3+
includesWithSubRequirements,
4+
ifCodeMatch,
5+
courseMatchesCodeOptions,
6+
} from '../../requirements/checkers';
7+
import { AdvisorGroup } from '../../tools/advisors/types';
8+
9+
const econILRMinorRequirements: readonly CollegeOrMajorRequirement[] = [
10+
{
11+
name: 'Prerequisites',
12+
description:
13+
'MATH 1110 with grade C or better, ECON 1110 and ECON 1120 with grades B- or better.',
14+
source: 'https://economics.cornell.edu/minor',
15+
checker: includesWithSubRequirements(['MATH 1110'], ['ECON 1110'], ['ECON 1120']),
16+
fulfilledBy: 'courses',
17+
perSlotMinCount: [1, 1, 1],
18+
slotNames: ['MATH 1110', 'ECON 1110', 'ECON 1120'],
19+
checkerWarning:
20+
'ECON 1110 or ECON 1120 will count toward the Economics Minor only if credit for the course appears on your Cornell transcript.',
21+
},
22+
{
23+
name: 'Intermediate Courses',
24+
description: 'ECON 3030 and ECON 3040. Must be taken at Cornell.',
25+
source: 'https://economics.cornell.edu/minor',
26+
checker: includesWithSubRequirements(['ECON 3030'], ['ECON 3040']),
27+
fulfilledBy: 'courses',
28+
perSlotMinCount: [1, 1],
29+
slotNames: ['ECON 3030', 'ECON 3040'],
30+
},
31+
{
32+
name: 'Statistics and Econometrics',
33+
description:
34+
'Option 1: ECON 3110 and ECON 3120. Option 2: ECON 3130 and ECON 3140. Must be taken at Cornell.',
35+
source: 'https://economics.cornell.edu/minor',
36+
fulfilledBy: 'toggleable',
37+
fulfillmentOptions: {
38+
'Option 1': {
39+
description: 'ECON 3110 and ECON 3120',
40+
counting: 'courses',
41+
checker: includesWithSubRequirements(['ECON 3110'], ['ECON 3120']),
42+
perSlotMinCount: [1, 1],
43+
slotNames: ['ECON 3110', 'ECON 3120'],
44+
},
45+
'Option 2': {
46+
description: 'ECON 3130 and ECON 3140',
47+
counting: 'courses',
48+
checker: includesWithSubRequirements(['ECON 3130'], ['ECON 3140']),
49+
perSlotMinCount: [1, 1],
50+
slotNames: ['ECON 3130', 'ECON 3140'],
51+
},
52+
},
53+
},
54+
{
55+
name: 'Additional ECON Courses',
56+
description:
57+
'Additional 3000 or 4000 level ECON courses to reach a total of 9 courses. ' +
58+
'ECON 4990, 4991, and 4999 cannot be counted. ' +
59+
'At least 5 of your 3000/4000-level courses must be taken at Cornell. ' +
60+
'The exception for this is for Study Abroad, in which you must take at least 4 of these courses at Cornell.',
61+
source: 'https://economics.cornell.edu/minor',
62+
checker: [
63+
(course: Course): boolean => {
64+
if (
65+
courseMatchesCodeOptions(course, [
66+
'ECON 4990',
67+
'ECON 4991',
68+
'ECON 4999',
69+
'ECON 3030',
70+
'ECON 3040',
71+
'ECON 3110',
72+
'ECON 3120',
73+
'ECON 3130',
74+
'ECON 3140',
75+
])
76+
) {
77+
return false;
78+
}
79+
return (
80+
ifCodeMatch(course.subject, 'ECON') &&
81+
(ifCodeMatch(course.catalogNbr, '3***') || ifCodeMatch(course.catalogNbr, '4***'))
82+
);
83+
},
84+
],
85+
fulfilledBy: 'courses',
86+
perSlotMinCount: [3],
87+
slotNames: ['Course'],
88+
},
89+
];
90+
91+
export default econILRMinorRequirements;
92+
93+
export const econILRMinorAdvisors: AdvisorGroup = {
94+
advisors: [{ name: 'Sarah Louise Schupp', email: 'sls499@cornell.edu' }],
95+
};

‎src/requirements/__test__/__snapshots__/requirement-data-id.test.ts.snap

+4
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,10 @@ Array [
406406
"Minor-ECE-4000+ Courses",
407407
"Minor-ECE-Requirement 1",
408408
"Minor-ECE-Requirement 2",
409+
"Minor-ECONILR-Additional ECON Courses",
410+
"Minor-ECONILR-Intermediate Courses",
411+
"Minor-ECONILR-Prerequisites",
412+
"Minor-ECONILR-Statistics and Econometrics",
409413
"Minor-GAMEDESIGN-4 Additional Courses",
410414
"Minor-GAMEDESIGN-Requirement 1",
411415
"Minor-GAMEDESIGN-Requirement 2",

‎src/requirements/decorated-requirements.json

+219
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.