Wow we missed a really major spot check
This commit is contained in:
@@ -74,23 +74,23 @@ async function PapaParse(department, num, name, sem, unique) {
|
||||
} else {
|
||||
if(sem.substring(0,2)==='s2') {
|
||||
console.log("Summer Semester Detected");
|
||||
selectedClass = cData.filter(cData => cData["Course Prefix"].includes(department))
|
||||
selectedClass = cData.filter(cData => cData["Course Prefix"] == department)
|
||||
.filter(cData => cData["Course Number"].includes(num.toString().toUpperCase()))
|
||||
.filter(cData => cData["Course Title"].includes(name));
|
||||
if (selectedClass.length == 0) {
|
||||
// summer names are weird
|
||||
console.log("Invalid name; trying again with just the course number");
|
||||
selectedClass = cData.filter(cData => cData["Course Prefix"].includes(department))
|
||||
selectedClass = cData.filter(cData => cData["Course Prefix"] == department)
|
||||
.filter(cData => cData["Course Number"].includes(num.toString().toUpperCase()))
|
||||
}
|
||||
} else {
|
||||
selectedClass = cData.filter(cData => cData["Course Prefix"].includes(department))
|
||||
selectedClass = cData.filter(cData => cData["Course Prefix"] == department)
|
||||
.filter(cData => cData["Course Number"] == num.toString().toUpperCase())
|
||||
.filter(cData => cData["Course Title"].includes(name));
|
||||
if (selectedClass.length == 0) {
|
||||
// Possible that the class name was typed wrong; try again with just the course number
|
||||
console.log("Invalid name; trying again with just the course number");
|
||||
selectedClass = cData.filter(cData => cData["Course Prefix"].includes(department))
|
||||
selectedClass = cData.filter(cData => cData["Course Prefix"] == department)
|
||||
.filter(cData => cData["Course Number"] == num.toString().toUpperCase());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user