Skip to content

Commit

Permalink
Support ILR Econ Minor (#959)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Destaq authored Nov 17, 2024
1 parent 275203e commit 556f310
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import mpaRequirements, { mpaAdvisors } from './grad/mpa';

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

const json: RequirementsJson = {
university: {
Expand Down Expand Up @@ -529,6 +530,13 @@ const json: RequirementsJson = {
advisors: eceMinorAdvisors,
abbrev: 'ECE',
},
ECONILR: {
name: 'Economics [ILR]',
schools: ['IL'],
requirements: econILRMinorRequirements,
advisors: econILRMinorAdvisors,
abbrev: 'EconILR',
},
GAMEDESIGN: {
name: 'Game Design',
schools: ['EN', 'AS1', 'AS2'],
Expand Down
95 changes: 95 additions & 0 deletions src/data/minors/econILR.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import { CollegeOrMajorRequirement, Course } from '../../requirements/types';
import {
includesWithSubRequirements,
ifCodeMatch,
courseMatchesCodeOptions,
} from '../../requirements/checkers';
import { AdvisorGroup } from '../../tools/advisors/types';

const econILRMinorRequirements: readonly CollegeOrMajorRequirement[] = [
{
name: 'Prerequisites',
description:
'MATH 1110 with grade C or better, ECON 1110 and ECON 1120 with grades B- or better.',
source: 'https://economics.cornell.edu/minor',
checker: includesWithSubRequirements(['MATH 1110'], ['ECON 1110'], ['ECON 1120']),
fulfilledBy: 'courses',
perSlotMinCount: [1, 1, 1],
slotNames: ['MATH 1110', 'ECON 1110', 'ECON 1120'],
checkerWarning:
'ECON 1110 or ECON 1120 will count toward the Economics Minor only if credit for the course appears on your Cornell transcript.',
},
{
name: 'Intermediate Courses',
description: 'ECON 3030 and ECON 3040. Must be taken at Cornell.',
source: 'https://economics.cornell.edu/minor',
checker: includesWithSubRequirements(['ECON 3030'], ['ECON 3040']),
fulfilledBy: 'courses',
perSlotMinCount: [1, 1],
slotNames: ['ECON 3030', 'ECON 3040'],
},
{
name: 'Statistics and Econometrics',
description:
'Option 1: ECON 3110 and ECON 3120. Option 2: ECON 3130 and ECON 3140. Must be taken at Cornell.',
source: 'https://economics.cornell.edu/minor',
fulfilledBy: 'toggleable',
fulfillmentOptions: {
'Option 1': {
description: 'ECON 3110 and ECON 3120',
counting: 'courses',
checker: includesWithSubRequirements(['ECON 3110'], ['ECON 3120']),
perSlotMinCount: [1, 1],
slotNames: ['ECON 3110', 'ECON 3120'],
},
'Option 2': {
description: 'ECON 3130 and ECON 3140',
counting: 'courses',
checker: includesWithSubRequirements(['ECON 3130'], ['ECON 3140']),
perSlotMinCount: [1, 1],
slotNames: ['ECON 3130', 'ECON 3140'],
},
},
},
{
name: 'Additional ECON Courses',
description:
'Additional 3000 or 4000 level ECON courses to reach a total of 9 courses. ' +
'ECON 4990, 4991, and 4999 cannot be counted. ' +
'At least 5 of your 3000/4000-level courses must be taken at Cornell. ' +
'The exception for this is for Study Abroad, in which you must take at least 4 of these courses at Cornell.',
source: 'https://economics.cornell.edu/minor',
checker: [
(course: Course): boolean => {
if (
courseMatchesCodeOptions(course, [
'ECON 4990',
'ECON 4991',
'ECON 4999',
'ECON 3030',
'ECON 3040',
'ECON 3110',
'ECON 3120',
'ECON 3130',
'ECON 3140',
])
) {
return false;
}
return (
ifCodeMatch(course.subject, 'ECON') &&
(ifCodeMatch(course.catalogNbr, '3***') || ifCodeMatch(course.catalogNbr, '4***'))
);
},
],
fulfilledBy: 'courses',
perSlotMinCount: [3],
slotNames: ['Course'],
},
];

export default econILRMinorRequirements;

export const econILRMinorAdvisors: AdvisorGroup = {
advisors: [{ name: 'Sarah Louise Schupp', email: '[email protected]' }],
};
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ Array [
"Minor-ECE-4000+ Courses",
"Minor-ECE-Requirement 1",
"Minor-ECE-Requirement 2",
"Minor-ECONILR-Additional ECON Courses",
"Minor-ECONILR-Intermediate Courses",
"Minor-ECONILR-Prerequisites",
"Minor-ECONILR-Statistics and Econometrics",
"Minor-GAMEDESIGN-4 Additional Courses",
"Minor-GAMEDESIGN-Requirement 1",
"Minor-GAMEDESIGN-Requirement 2",
Expand Down
219 changes: 219 additions & 0 deletions src/requirements/decorated-requirements.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 556f310

Please sign in to comment.