Skip to content
Open
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
1 change: 1 addition & 0 deletions scrapers/fireroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ def get_course_data(
"name": course.get("title", ""),
"inCharge": ",".join(course.get("instructors", [])), # type: ignore
"virtualStatus": course.get("virtual_status", "") == "Virtual",
"is_half_class": course.get("is_half_class", False),
}
)

Expand Down
5 changes: 5 additions & 0 deletions scrapers/overrides.toml.d/override-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,11 @@
"title": "New",
"description": "True if subject is new"
},
"is_half_class": {
"type": "boolean",
"title": "Half HASS-A",
"description": "True if class counts as half HASS-A"
},
"rating": {
"type": "number",
"title": "Rating",
Expand Down
3 changes: 3 additions & 0 deletions scrapers/overrides.toml.d/sem/21h.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ inCharge = "I. Kumekawa"
url = "https://history.mit.edu/subjects/special-subject-history-4/"
hass = ["H"]
new = true

["21M.460"]
is_half_class = true
3 changes: 3 additions & 0 deletions scrapers/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def run() -> None:
| get_include(overrides_all)
| get_include(overrides_sem),
)
for course_num, course in courses.items():
if course_num.startswith("21M.1") or course_num.startswith("21M.4"):
course["is_half_class"] = True

term_info = get_term_info(sem)
url_name = term_info["urlName"]
Expand Down
8 changes: 7 additions & 1 deletion src/components/ActivityDescription.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useContext } from "react";
import { decode } from "html-entities";
import { HASS } from "../lib/raw";

import {
Flex,
Expand Down Expand Up @@ -110,7 +111,12 @@ function ClassTypes(props: { cls: Class }) {
["phys2", "Physics 2"],
["rest", "REST"],
["hassH", "HASS-H"],
["hassA", "HASS-A"],
[
"hassA",
cls.rawClass.hass.includes(HASS.A) && cls.rawClass.is_half_class
? "HASS-A (half)"
: "HASS-A",
],
["hassS", "HASS-S"],
["hassE", "HASS-E"],
["cih", "CI-H"],
Expand Down
2 changes: 2 additions & 0 deletions src/lib/raw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export interface RawClass {
subject: string;
/** True if some section is not scheduled yet */
tba: boolean;
/** True if this counts as half of a HASS-A class */
is_half_class?: boolean;

/** Kinds of sections (among LECTURE, RECITATION, LAB, DESIGN) that exist */
sectionKinds: SectionKind[];
Expand Down