From e57b5a5d693a81ef7bf384135d620c1d34c09ddd Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 7 Dec 2019 11:17:30 -0500 Subject: [PATCH] [+] Encapsulate getGrading(term) --- src/logic/course.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/logic/course.ts b/src/logic/course.ts index 52c47c1..010438a 100644 --- a/src/logic/course.ts +++ b/src/logic/course.ts @@ -103,7 +103,7 @@ export default class Course } else this.level = 'Unknown'; - this.grading = new Array(4); + this.rawGrading = new Array(4); } /** @@ -131,6 +131,16 @@ export default class Course this.computed = {termAssignments: termAssignments, allYearGrade: -1}; } + /** + * Get grading by term + * + * @param term + */ + getGrading(term: number) + { + return this.rawGrading[term]; + } + /** * Is graded or not */