[O] Remove getGradedCourses

This commit is contained in:
Hykilpikonna
2019-11-06 18:27:19 -05:00
parent b6e0e12cab
commit 92e692f69a
3 changed files with 4 additions and 36 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ export default class App extends Vue
pWaitFor(() => this.courses.every(c => c.assignments != null)).then(() =>
{
// Filter courses
this.filteredCourses = CourseUtils.getGradedCourses(this.courses);
this.filteredCourses = this.courses.filter(c => c.isGraded);
// Check grading algorithms
this.checkGradingAlgorithms();
-33
View File
@@ -19,39 +19,6 @@ UNKNOWN_COURSE_LIST.set('Painting', LEVEL_CP);
export class CourseUtils
{
/**
* Return a list of courses that are graphed
*
* @param original Original course list
* @return Course[] Filtered course list
*/
public static getGradedCourses(original: Course[]): Course[]
{
// Define result
let result: Course[] = [];
// Filter through courses
original.forEach(course =>
{
// Skip future or past courses
if (course.status != 'active') return;
// Skip courses without levels TODO: Ask for user input
if (course.level == 'None' || course.level == 'Unknown' || course.scaleUp == -1) return;
// Skip courses without graded assignments
if (course.assignments.filter(a => a.complete == 'Complete').length == 0) return;
// Skip if there are no grading scale
// if (course.grading.method == 'NOT_GRADED') return;
// Add it to the list
result.push(course);
});
return result;
}
/**
* Format course to tab index string
*
+3 -2
View File
@@ -1,8 +1,9 @@
import Course from '@/logic/course';
/**
* This is an utility class to calculate GPA.
*/
import {Course} from '@/components/app/app';
export class GPAUtils
{
// [[Min score, Letter grade, Base GPA], ...]