This commit is contained in:
2023-04-29 05:30:50 -05:00
parent 4f1efd12b1
commit 50c7e0468b

View File

@@ -64,7 +64,7 @@ async function PapaParse(department, num, name, sem) {
.then(data => { cData = data; });
let selectedClass = cData.filter(cData => cData["Course Prefix"].includes(department))
.filter(handleSummer(cData, sem))
.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
@@ -121,13 +121,6 @@ async function PapaParse(department, num, name, sem) {
}
}
function handleSummer(cData, sem) {
if(sem.includes("sum")) {
return cData["Course Number"].includes(num.toString().toUpperCase());
} else {
return cData["Course Number"] == num.toString().toUpperCase();
}
}
function loadChart(gradeDist, courseName) {
gradeChart = new Chart(ctx, {
type: 'bar',