@@ -109,12 +109,9 @@ export default class OverallLine extends Vue
|
|||||||
*/
|
*/
|
||||||
private getCourseSeries(course: Course)
|
private getCourseSeries(course: Course)
|
||||||
{
|
{
|
||||||
console.log('====================');
|
|
||||||
// Graded assignments
|
// Graded assignments
|
||||||
let assignments = course.assignments.slice().reverse();
|
let assignments = course.assignments.slice().reverse();
|
||||||
|
|
||||||
let currentTerm = 0;
|
|
||||||
|
|
||||||
// Create series
|
// Create series
|
||||||
return {
|
return {
|
||||||
name: course.name,
|
name: course.name,
|
||||||
@@ -123,15 +120,8 @@ export default class OverallLine extends Vue
|
|||||||
symbol: 'circle', // circle, diamond, emptyCircle, none
|
symbol: 'circle', // circle, diamond, emptyCircle, none
|
||||||
data: this.toDateRange([...assignments.map(a => a.time)].map((time, i) =>
|
data: this.toDateRange([...assignments.map(a => a.time)].map((time, i) =>
|
||||||
{
|
{
|
||||||
// Find current term
|
|
||||||
if (time > Constants.TERMS[currentTerm + 1].getTime())
|
|
||||||
currentTerm ++;
|
|
||||||
|
|
||||||
// Find subset before this assignment
|
// Find subset before this assignment
|
||||||
let subset = assignments.filter(a =>
|
let subset = assignments.filter(a => a.time <= time);
|
||||||
a.time >= Constants.TERMS[currentTerm].getTime() && a.time <= time);
|
|
||||||
|
|
||||||
console.log(subset);
|
|
||||||
|
|
||||||
// Find grade
|
// Find grade
|
||||||
if (course.grading.method == 'PERCENT_TYPE')
|
if (course.grading.method == 'PERCENT_TYPE')
|
||||||
|
|||||||
Reference in New Issue
Block a user