[+] Encapsulate getGradingPeriods()

This commit is contained in:
Hykilpikonna
2019-12-07 11:21:19 -05:00
parent e57b5a5d69
commit 99f1a4c58a
+9
View File
@@ -162,6 +162,15 @@ export default class Course
return true;
}
/**
* Get currently selected grading periods
*/
get gradingPeriods(): number[]
{
let timeCode = Navigation.instance.getSelectedGradingPeriod();
return timeCode == -1 ? [0, 1, 2, 3] : [timeCode];
}
/**
* Get assignments of the selected time
*/