Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Changelog

## 2.1.24 (2026-11-17)

### Changes
- BS Agriculture students can pick Agronomy, Animal Science, Horticulture, Agricultural Systems, Landscape Agroforestry, Soil Science or Agricultural Extension as their major, and its major courses and seminar fill the major slots. Animal Science and the four ASI majors also fill their specialized course slots from their institute lists.

## 2.1.23 (2026-11-17)

### Changes
- A checklist line that names either of two courses, like SOC 130 or SOC 135 in BA Socio and CERP, HFDS or SDS 200 in BS HE, takes either one. Eight programs have these lines in the 2025 catalogs.
||||||| ee00230
- BS Industrial Engineering's technical cognates take only the six courses the IE department lists.
- BA Communication Arts' major slots take only the Speech, Theater Arts and Writing courses in the Department of Humanities catalog.
- AA Sports Studies has its ARTS 1 or STS 1 row in first year, as the CAS checklist has it, so another GE course no longer fills it.
Expand Down
6 changes: 3 additions & 3 deletions extension/curriculum-data.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { UPLB_CATALOG } = require('./src/catalog.js');
// (GE, HK, NSTP, FE) or the data uses (MAJ for major elective slots), and
// real departments with no class in the listings we have.
const DEPTS = new Set(Object.keys(UPLB_CATALOG).map(c => c.split(' ')[0]));
['GE', 'HK', 'NSTP', 'FE', 'MAJ', 'HIST', 'PED', 'POSC', 'SOIL', 'MST', 'WLDL', 'AMPE', 'WIKA'].forEach(d => DEPTS.add(d));
['GE', 'HK', 'NSTP', 'FE', 'MAJ', 'HIST', 'PED', 'POSC', 'SOIL', 'MST', 'WLDL', 'AMPE', 'WIKA', 'AF'].forEach(d => DEPTS.add(d));
const CODE_RE = /^([A-Z]{2,6}|PEd) \d{1,3}(\.\d{1,2})?[A-Z]?( \(\d\))?$/;

function codeProblem(code) {
Expand Down Expand Up @@ -96,13 +96,13 @@ Object.values(UPLB_PROGRAMS).filter(p => p.tracks).forEach(p => {
// A specialization's `courses` rows are checked the same way; a row with a
// `slot` replaces that MAJ slot, any other row adds its units to the total.
// These are in the catalog PDFs but had no AMIS class in the terms we have.
const NOT_IN_AMIS = new Set(['FRM 110', 'BIO 151', 'BIO 130A', 'BIO 130B', 'MCB 101', 'BOT 110', 'BOT 140', 'ZOO 140', 'ZOO 113', 'CHEM 102', 'PHYS 193.1', 'WLDL 101']);
const NOT_IN_AMIS = new Set(['SFI 123', 'SFI 143', 'AF 199', 'SOIL 191', 'FRM 110', 'BIO 151', 'BIO 130A', 'BIO 130B', 'MCB 101', 'BOT 110', 'BOT 140', 'ZOO 140', 'ZOO 113', 'CHEM 102', 'PHYS 193.1', 'WLDL 101']);
const checklistCodes = new Set(Object.values(UPLB_PROGRAMS).flatMap(p => (p.majorCourses || []).map(c => normalizeCourseCode(c.code))));
Object.values(UPLB_PROGRAMS).filter(p => p.specializations).forEach(p => {
const rows = new Map((p.majorCourses || []).map(c => [normalizeCourseCode(c.code), c]));
const baseUnits = getPlannerCourses(p, p.defaultTrack).reduce((s, c) => s + c.units, 0);
Object.entries(p.specializations).forEach(([key, spec]) => {
if (!spec.name || !/page \d+/.test(spec.source || '')) fail(p.code, `specialization ${key} needs a name and a catalog page`);
if (!spec.name || !/page \d+|https:\/\//.test(spec.source || '')) fail(p.code, `specialization ${key} needs a name and a catalog page or link`);
const courseRows = spec.courses || [];
courseRows.forEach(c => {
if (c.slot && !(rows.get(c.slot) && rows.get(c.slot).genericRequirement === 'elective')) fail(p.code, `${key} slot ${c.slot} is not a MAJ elective row`);
Expand Down
12 changes: 12 additions & 0 deletions extension/requirements.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,15 @@ assert.deepStrictEqual(lightSems([
const fill = fillRequirementSlots(math, [{ code: 'STAT 101', title: '', units: 3, result: 'passed' }]);
assert.ok(majors.every(c => !fill.has(c.code)), 'STAT is not a MATH major elective');
}

// BS Agriculture majors take their institute's major courses.
{
const passed = codes => codes.map(code => ({ code, title: '', units: 3, result: 'passed' }));
const agro = plannerCourseList(UPLB_PROGRAMS.BSAGRI, null, UPLB_CATALOG, 'agronomy');
const fill = fillRequirementSlots(agro, passed(['AGR 141', 'ENT 101']));
assert.strictEqual(fill.get('MAJ 1')?.code, 'AGR 141');
assert.strictEqual(fill.get('MAJ 4')?.code, 'ENT 101');
const soil = plannerCourseList(UPLB_PROGRAMS.BSAGRI, null, UPLB_CATALOG, 'soil');
assert.ok(['SOIL 101', 'SOIL 199'].every(code => soil.some(c => c.code === code)));
assert.ok(soil.filter(c => c.options).every(c => c.options.includes('SOIL 142')));
}
2 changes: 1 addition & 1 deletion extension/src/catalog.js

Large diffs are not rendered by default.

Loading
Loading