meh
This commit is contained in:
9
main.js
9
main.js
@@ -64,7 +64,7 @@ async function PapaParse(department, num, name, sem) {
|
|||||||
.then(data => { cData = data; });
|
.then(data => { cData = data; });
|
||||||
|
|
||||||
let selectedClass = cData.filter(cData => cData["Course Prefix"].includes(department))
|
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));
|
.filter(cData => cData["Course Title"].includes(name));
|
||||||
if(selectedClass.length == 0) {
|
if(selectedClass.length == 0) {
|
||||||
// Possible that the class name was typed wrong; try again with just the course number
|
// 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) {
|
function loadChart(gradeDist, courseName) {
|
||||||
gradeChart = new Chart(ctx, {
|
gradeChart = new Chart(ctx, {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
|
|||||||
Reference in New Issue
Block a user