STSS/STSH merger

This commit is contained in:
3eef8a28f26fb2bcc514e6f1938929a1f931762 2023-02-08 23:26:45 -05:00
parent 736defdd0a
commit 3e4be443be

View file

@ -147,7 +147,13 @@ void handle_course(const Json::Value& course,
const std::string& term, const std::string& term,
quatalog_data_t& data, quatalog_data_t& data,
const Json::Value& term_prereqs) { const Json::Value& term_prereqs) {
const auto& course_code = course["id"].asString(); std::string course_code = course["id"].asString();
// Accounts for STSS/STSH merger. Perhaps not a perfect
// way to do this, but this makes generating the HTML
// much easier
if(course_code.substr(0,3) == "STS") {
course_code[4] = 'O';
}
auto& course_terms = data.terms_offered[course_code]; auto& course_terms = data.terms_offered[course_code];
const Json::Value& sections = course["sections"]; const Json::Value& sections = course["sections"];
handle_everything(sections,course,term,course_terms,data.prerequisites,term_prereqs); handle_everything(sections,course,term,course_terms,data.prerequisites,term_prereqs);