mirror of
https://github.com/quatalog/quatalog.git
synced 2024-11-25 00:03:40 +00:00
STSS/STSH merger
This commit is contained in:
parent
736defdd0a
commit
3e4be443be
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue