[O] Make gradedCourses a getter instead of a field
This commit is contained in:
@@ -58,6 +58,11 @@ export default class App extends Vue
|
|||||||
// Is the login panel shown
|
// Is the login panel shown
|
||||||
showLogin: boolean = !this.demoMode
|
showLogin: boolean = !this.demoMode
|
||||||
|
|
||||||
|
get gradedCourses()
|
||||||
|
{
|
||||||
|
return this.courses.filter(course => course.isGraded);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is called when the instance is created.
|
* This is called when the instance is created.
|
||||||
*/
|
*/
|
||||||
@@ -131,14 +136,7 @@ export default class App extends Vue
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Wait for assignments to be ready.
|
// Wait for assignments to be ready.
|
||||||
pWaitFor(() => this.courses.every(c => c.rawAssignments != null)).then(() =>
|
pWaitFor(() => this.courses.every(c => c.rawAssignments != null)).then(this.checkGradingAlgorithms);
|
||||||
{
|
|
||||||
// Filter courses
|
|
||||||
this.gradedCourses = this.courses.filter(c => c.isGraded);
|
|
||||||
|
|
||||||
// Check grading algorithms
|
|
||||||
this.checkGradingAlgorithms();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user