[M] Rename filteredCourses to gradedCourses
This commit is contained in:
@@ -21,9 +21,7 @@ export default class App extends Vue
|
|||||||
|
|
||||||
// List of course that the student takes
|
// List of course that the student takes
|
||||||
courses: Course[] = [];
|
courses: Course[] = [];
|
||||||
|
gradedCourses: Course[] = [];
|
||||||
// List of course that should be displayed
|
|
||||||
filteredCourses: Course[] = [];
|
|
||||||
|
|
||||||
// The currently selected tab
|
// The currently selected tab
|
||||||
selectedTab: string = 'overall';
|
selectedTab: string = 'overall';
|
||||||
@@ -133,7 +131,7 @@ export default class App extends Vue
|
|||||||
pWaitFor(() => this.courses.every(c => c.rawAssignments != null)).then(() =>
|
pWaitFor(() => this.courses.every(c => c.rawAssignments != null)).then(() =>
|
||||||
{
|
{
|
||||||
// Filter courses
|
// Filter courses
|
||||||
this.filteredCourses = this.courses.filter(c => c.isGraded);
|
this.gradedCourses = this.courses.filter(c => c.isGraded);
|
||||||
|
|
||||||
// Check grading algorithms
|
// Check grading algorithms
|
||||||
this.checkGradingAlgorithms();
|
this.checkGradingAlgorithms();
|
||||||
@@ -149,7 +147,7 @@ export default class App extends Vue
|
|||||||
this.logLoading('4. Checking grading algorithms...');
|
this.logLoading('4. Checking grading algorithms...');
|
||||||
|
|
||||||
// Loop through all the courses
|
// Loop through all the courses
|
||||||
for (const course of this.filteredCourses)
|
for (const course of this.gradedCourses)
|
||||||
{
|
{
|
||||||
for (const i of [0, 1, 2, 3])
|
for (const i of [0, 1, 2, 3])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div id="app" class="theme-default">
|
<div id="app" class="theme-default">
|
||||||
<login v-if="showLogin" v-on:login:user="onLogin"/>
|
<login v-if="showLogin" v-on:login:user="onLogin"/>
|
||||||
<navigation v-if="user != null"
|
<navigation v-if="user != null"
|
||||||
:courses="filteredCourses"
|
:courses="gradedCourses"
|
||||||
:activeIndex.sync="selectedTab"
|
:activeIndex.sync="selectedTab"
|
||||||
:user="user"
|
:user="user"
|
||||||
@sign-out="signOut" @select-time="selectTime">
|
@sign-out="signOut" @select-time="selectTime">
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
|
|
||||||
<div id="app-content" v-if="assignmentsReady && loading === ''">
|
<div id="app-content" v-if="assignmentsReady && loading === ''">
|
||||||
<overall v-if="selectedTab === 'overall'"
|
<overall v-if="selectedTab === 'overall'"
|
||||||
:courses="filteredCourses">
|
:courses="gradedCourses">
|
||||||
</overall>
|
</overall>
|
||||||
<course-page v-if="selectedTab.split('/')[0] === 'course'"
|
<course-page v-if="selectedTab.split('/')[0] === 'course'"
|
||||||
:course="filteredCourses.find(c => +c.id === +selectedTab.split('/')[1])">
|
:course="gradedCourses.find(c => +c.id === +selectedTab.split('/')[1])">
|
||||||
</course-page>
|
</course-page>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user