From b39c51beeaed26856e5cf7801960c53bb523c21e Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Wed, 6 Nov 2019 21:16:31 -0500 Subject: [PATCH] [O] getTotalMeanAverage pass in assignments not course --- src/utils/gpa-utils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/gpa-utils.ts b/src/utils/gpa-utils.ts index b7a7d60..ea3e854 100644 --- a/src/utils/gpa-utils.ts +++ b/src/utils/gpa-utils.ts @@ -1,5 +1,6 @@ import Course from '@/logic/course'; +import {Assignment} from '@/components/app/app'; /** * This is an utility class to calculate GPA. @@ -107,15 +108,15 @@ export class GPAUtils /** * Calculate the total-mean (total/max) average * - * @param course Course + * @param assignments */ - public static getTotalMeanAverage(course: Course) + public static getTotalMeanAverage(assignments: Assignment[]) { let score = 0; let max = 0; // Loop through assignments - course.assignments.forEach(assignment => + assignments.forEach(assignment => { // If assignment should be displayed if (assignment.complete != 'Complete') return;