Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8dbef09ec9 | |||
| 73b71f56a5 | |||
| ce702405d0 | |||
| 21744a1bef | |||
| 82064f2f02 | |||
| adfebc8c44 | |||
| 2f30e67671 | |||
| 0a80d534eb | |||
| a77c495843 | |||
| 5503aff6b1 | |||
| 7cc4567245 | |||
| e7f29ad0bf | |||
| cdbd101428 | |||
| da650ef16b | |||
| 8abfdd7f8e | |||
| 3c66f99363 | |||
| 251f87a072 |
@@ -3,14 +3,11 @@ import Login from '@/components/login/login';
|
|||||||
import Navigation from '@/components/navigation/navigation';
|
import Navigation from '@/components/navigation/navigation';
|
||||||
import Overall from '@/pages/overall/overall.vue';
|
import Overall from '@/pages/overall/overall.vue';
|
||||||
import Constants from '@/constants';
|
import Constants from '@/constants';
|
||||||
import JsonUtils from '@/utils/json-utils';
|
|
||||||
import pWaitFor from 'p-wait-for';
|
import pWaitFor from 'p-wait-for';
|
||||||
import {HttpUtils} from '@/utils/http-utils';
|
import {HttpUtils} from '@/utils/http-utils';
|
||||||
import {CourseUtils} from '@/utils/course-utils';
|
|
||||||
import {GPAUtils} from '@/utils/gpa-utils';
|
import {GPAUtils} from '@/utils/gpa-utils';
|
||||||
import Loading from '@/components/loading/loading.vue';
|
import Loading from '@/components/loading/loading.vue';
|
||||||
import CoursePage from '@/pages/course/course-page.vue';
|
import CoursePage from '@/pages/course/course-page.vue';
|
||||||
import {FormatUtils} from '@/utils/format-utils';
|
|
||||||
import Course from '@/logic/course';
|
import Course from '@/logic/course';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ export default class Constants
|
|||||||
public static API_URL: string = 'https://va.hydev.org/api';
|
public static API_URL: string = 'https://va.hydev.org/api';
|
||||||
|
|
||||||
/** Current version */
|
/** Current version */
|
||||||
public static VERSION: string = '0.4.1.895';
|
public static VERSION: string = '0.4.2.912';
|
||||||
|
|
||||||
/** Minimum version that still supports the same cookies */
|
/** Minimum version that still supports the same cookies */
|
||||||
public static MIN_SUPPORTED_VERSION: string = '0.3.4.561';
|
public static MIN_SUPPORTED_VERSION: string = '0.3.4.561';
|
||||||
|
|||||||
+18
-4
@@ -1,6 +1,5 @@
|
|||||||
import App, {Assignment} from '@/components/app/app';
|
import {Assignment} from '@/components/app/app';
|
||||||
import JsonUtils from '@/utils/json-utils';
|
import JsonUtils from '@/utils/json-utils';
|
||||||
import Constants from '@/constants';
|
|
||||||
import {FormatUtils} from '@/utils/format-utils';
|
import {FormatUtils} from '@/utils/format-utils';
|
||||||
import {CourseUtils} from '@/utils/course-utils';
|
import {CourseUtils} from '@/utils/course-utils';
|
||||||
import Navigation from '@/components/navigation/navigation';
|
import Navigation from '@/components/navigation/navigation';
|
||||||
@@ -49,6 +48,13 @@ export default class Course
|
|||||||
this.rawLetterGrade = courseJson.letterGrade;
|
this.rawLetterGrade = courseJson.letterGrade;
|
||||||
this.rawNumericGrade = courseJson.numericGrade;
|
this.rawNumericGrade = courseJson.numericGrade;
|
||||||
|
|
||||||
|
// Other api issue
|
||||||
|
if (this.rawLetterGrade == '')
|
||||||
|
{
|
||||||
|
this.rawNumericGrade = undefined;
|
||||||
|
this.rawLetterGrade = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
// Level and scaleUp
|
// Level and scaleUp
|
||||||
let level = CourseUtils.detectLevel(this.name);
|
let level = CourseUtils.detectLevel(this.name);
|
||||||
if (level != undefined)
|
if (level != undefined)
|
||||||
@@ -124,14 +130,18 @@ export default class Course
|
|||||||
return this.computed.termAssignments[timeCode];
|
return this.computed.termAssignments[timeCode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Optimize this
|
||||||
|
private letterGradeComputed = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get letter grade
|
* Get letter grade
|
||||||
*/
|
*/
|
||||||
get letterGrade(): string
|
get letterGrade(): string
|
||||||
{
|
{
|
||||||
// Cached
|
// Cached
|
||||||
if (this.rawLetterGrade != undefined)
|
if (this.rawLetterGrade != undefined && this.letterGradeComputed)
|
||||||
return this.rawLetterGrade;
|
return this.rawLetterGrade;
|
||||||
|
this.letterGradeComputed = true;
|
||||||
|
|
||||||
// Get scale
|
// Get scale
|
||||||
let scale = GPAUtils.findScale(this.numericGrade);
|
let scale = GPAUtils.findScale(this.numericGrade);
|
||||||
@@ -143,14 +153,17 @@ export default class Course
|
|||||||
return this.rawLetterGrade = scale.letter;
|
return this.rawLetterGrade = scale.letter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private numericGradeComputed = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get numeric grade
|
* Get numeric grade
|
||||||
*/
|
*/
|
||||||
get numericGrade(): number
|
get numericGrade(): number
|
||||||
{
|
{
|
||||||
// Cached
|
// Cached
|
||||||
if (this.rawNumericGrade != undefined)
|
if (this.rawNumericGrade != undefined && this.numericGradeComputed)
|
||||||
return this.rawNumericGrade;
|
return this.rawNumericGrade;
|
||||||
|
this.numericGradeComputed = true;
|
||||||
|
|
||||||
// Calculate
|
// Calculate
|
||||||
if (this.grading.method == 'PERCENT_TYPE')
|
if (this.grading.method == 'PERCENT_TYPE')
|
||||||
@@ -162,6 +175,7 @@ export default class Course
|
|||||||
return this.rawNumericGrade = GPAUtils.getTotalMeanAverage(this.assignments);
|
return this.rawNumericGrade = GPAUtils.getTotalMeanAverage(this.assignments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Error
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,15 +27,10 @@
|
|||||||
@Prop({required: true}) typeName: string;
|
@Prop({required: true}) typeName: string;
|
||||||
@Prop({required: true}) assignments: Assignment[];
|
@Prop({required: true}) assignments: Assignment[];
|
||||||
|
|
||||||
filteredAssignments: Assignment[];
|
get filteredAssignments()
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when this component is created
|
|
||||||
*/
|
|
||||||
created()
|
|
||||||
{
|
{
|
||||||
// Filter assignments to only this type
|
// Filter assignments to only this type
|
||||||
this.filteredAssignments = this.assignments.filter(a => a.type == this.typeName);
|
return this.assignments.filter(a => a.complete == 'Complete' && a.type == this.typeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
get average()
|
get average()
|
||||||
|
|||||||
@@ -44,7 +44,51 @@ export default class OverallLine extends Vue
|
|||||||
],
|
],
|
||||||
series:
|
series:
|
||||||
{
|
{
|
||||||
smooth: true
|
smooth: true,
|
||||||
|
|
||||||
|
// Mark area
|
||||||
|
markArea:
|
||||||
|
{
|
||||||
|
silent: true,
|
||||||
|
data:
|
||||||
|
[
|
||||||
|
// Above 100
|
||||||
|
[
|
||||||
|
{
|
||||||
|
yAxis: 120,
|
||||||
|
itemStyle: {color: 'rgba(230,253,255,0.09)'}
|
||||||
|
}, {yAxis: 100}
|
||||||
|
],
|
||||||
|
// 90 to 100
|
||||||
|
[
|
||||||
|
{
|
||||||
|
yAxis: 100,
|
||||||
|
itemStyle: {color: 'rgba(241,255,237,0.09)'}
|
||||||
|
}, {yAxis: 90}
|
||||||
|
],
|
||||||
|
// 80 to 90
|
||||||
|
[
|
||||||
|
{
|
||||||
|
yAxis: 90,
|
||||||
|
itemStyle: {color: 'rgba(255,250,216,0.09)'}
|
||||||
|
}, {yAxis: 80}
|
||||||
|
],
|
||||||
|
// 70 to 80
|
||||||
|
[
|
||||||
|
{
|
||||||
|
yAxis: 80,
|
||||||
|
itemStyle: {color: 'rgba(255,225,199,0.1)'}
|
||||||
|
}, {yAxis: 70}
|
||||||
|
],
|
||||||
|
// Below 70 (Fail)
|
||||||
|
[
|
||||||
|
{
|
||||||
|
yAxis: 70,
|
||||||
|
itemStyle: {color: 'rgb(255,190,184, 0.09)'}
|
||||||
|
}, {yAxis: -100}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
xAxis:
|
xAxis:
|
||||||
{
|
{
|
||||||
@@ -53,7 +97,7 @@ export default class OverallLine extends Vue
|
|||||||
yAxis:
|
yAxis:
|
||||||
{
|
{
|
||||||
min: (value: any) => Math.floor(value.min),
|
min: (value: any) => Math.floor(value.min),
|
||||||
max: (value: any) => value.max
|
max: (value: any) => Math.min(value.max, 110)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,17 @@
|
|||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-grade
|
||||||
|
{
|
||||||
|
font-size: 30px;
|
||||||
|
color: #b1b1b1;
|
||||||
|
|
||||||
|
// Disable selecting
|
||||||
|
display:block;
|
||||||
|
pointer-events: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
// Cards
|
// Cards
|
||||||
.el-card.overall-bar-card
|
.el-card.overall-bar-card
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="overall">
|
<div id="overall">
|
||||||
<el-row>
|
<el-row v-if="getGPA().gpa !== -1">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-card class="large gpa-card vertical-center">
|
<el-card class="large gpa-card vertical-center">
|
||||||
<div style="padding: 14px;">
|
<div style="padding: 14px;">
|
||||||
@@ -25,6 +25,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-row v-if="getGPA().gpa === -1">
|
||||||
|
<el-card class="large gpa-card vertical-center">
|
||||||
|
<div class="no-grade">This quarter has no grades yet...</div>
|
||||||
|
</el-card>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<overall-course v-for="course in courses"
|
<overall-course v-for="course in courses"
|
||||||
:course="course"
|
:course="course"
|
||||||
:key="course.id">
|
:key="course.id">
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import {FormatUtils} from '@/utils/format-utils';
|
|
||||||
import Course from '@/logic/course';
|
import Course from '@/logic/course';
|
||||||
|
|
||||||
const LEVEL_AP = {level: 'AP', scaleUp: 1};
|
const LEVEL_AP = {level: 'AP', scaleUp: 1};
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import Course from '@/logic/course';
|
import Course from '@/logic/course';
|
||||||
import {Assignment} from '@/components/app/app';
|
import {Assignment} from '@/components/app/app';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user