Compare commits
16 Commits
0.5.3.1373
...
0.5.4.1391
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c8bde24b3 | |||
| 158344f24f | |||
| 78159fda3f | |||
| 8988e02793 | |||
| 6e7642e126 | |||
| 47bea6197a | |||
| ea17b3e9ea | |||
| da719a0a6b | |||
| f654527311 | |||
| 880dea1bef | |||
| 021915d9d4 | |||
| 1fb0102328 | |||
| 1fc2a2adda | |||
| ddc1024611 | |||
| 1de041351c | |||
| f64cf0ad02 |
+1
-1
@@ -10,7 +10,7 @@ export default class Constants
|
||||
// static API_URL: string = 'http://localhost:24021/api';
|
||||
|
||||
/** Current version */
|
||||
static VERSION: string = '0.5.3.1373';
|
||||
static VERSION: string = '0.5.4.1391';
|
||||
|
||||
/** The minimum version that still supports the same cookies */
|
||||
static MIN_SUPPORTED_VERSION: string = '0.4.6.1087';
|
||||
|
||||
+11
-6
@@ -63,7 +63,9 @@ export class Assignment
|
||||
get graded()
|
||||
{
|
||||
// TODO: Add more cases
|
||||
return this.include && (this.complete == 'Complete' || this.complete == 'Late' || this.complete == 'NREQ');
|
||||
// Incomplete doesn't mean that the teacher didn't grade it yet, which is "Pending".
|
||||
// NREQ is not graded.
|
||||
return this.include && (this.complete == 'Complete' || this.complete == 'Late' || this.complete == 'Incomplete');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,9 +77,11 @@ export class Assignment
|
||||
{
|
||||
switch (this.complete)
|
||||
{
|
||||
case 'Complete': return '';
|
||||
case 'Pending': return 'Pending'; // ID: 0
|
||||
case 'Incomplete': return 'Incomplete'; // ID: 2
|
||||
case 'Complete': return ''; // ID: 3
|
||||
case 'NREQ': return 'Dropped'; // ID: 4
|
||||
case 'Late': return 'Late';
|
||||
case 'NREQ': return 'Dropped';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,8 +92,10 @@ export class Assignment
|
||||
{
|
||||
switch (this.complete)
|
||||
{
|
||||
case 'Late': return '#ff0036';
|
||||
case 'Pending': return '#b1b1b1';
|
||||
case 'Incomplete': return '#ff7a2f';
|
||||
case 'NREQ': return '#41b141';
|
||||
case 'Late': return '#ff0036';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +277,6 @@ export default class Course
|
||||
{
|
||||
return this.gradingPeriods
|
||||
.flatMap(term => this.termAssignments[term])
|
||||
.filter(a => a.graded)
|
||||
.sort((a, b) => b.time - a.time);
|
||||
}
|
||||
|
||||
@@ -374,7 +379,7 @@ export default class Course
|
||||
return types.map(type =>
|
||||
{
|
||||
// Get assignments of the type
|
||||
let typeAssignments = this.assignments.filter(a => a.type == type);
|
||||
let typeAssignments = this.assignments.filter(a => a.graded && a.type == type);
|
||||
|
||||
// Count scores and max scores
|
||||
let score = typeAssignments.reduce((sum, a) => sum + a.score, 0);
|
||||
|
||||
@@ -127,7 +127,7 @@ export class GPAUtils
|
||||
assignments.forEach(assignment =>
|
||||
{
|
||||
// If assignment should be displayed
|
||||
if (assignment.complete != 'Complete') return;
|
||||
if (!assignment.graded) return;
|
||||
|
||||
// Record scores
|
||||
score += assignment.score;
|
||||
@@ -153,7 +153,7 @@ export class GPAUtils
|
||||
assignments.forEach(assignment =>
|
||||
{
|
||||
// If assignment should be displayed
|
||||
if (assignment.complete != 'Complete') return;
|
||||
if (!assignment.graded) return;
|
||||
|
||||
// Record scores
|
||||
if (typeScores[assignment.type] == undefined) typeScores[assignment.type] = 0;
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<span id="type-average">Average: {{type.percent}}%</span>
|
||||
</div>
|
||||
|
||||
<AssignmentEntry v-for="assignment of filteredAssignments" :key="assignment.id"
|
||||
<AssignmentEntry v-for="(assignment, index) of filteredAssignments" :key="assignment.id"
|
||||
:assignment="assignment" :unread="false"
|
||||
backgroundColor="#ffffff" narrow="true">
|
||||
:backgroundColor="index % 2 === 1 ? '#ffffff' : '#f7f7f7'" narrow="true">
|
||||
</AssignmentEntry>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -36,6 +36,11 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#assignment-type-head
|
||||
{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#type-info-card
|
||||
{
|
||||
height: 60px;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// Date
|
||||
.el-col.date
|
||||
{
|
||||
min-width: 130px;
|
||||
min-width: 150px;
|
||||
|
||||
span.month
|
||||
{
|
||||
@@ -57,6 +57,9 @@
|
||||
text-align: right;
|
||||
float: right;
|
||||
|
||||
// Fix smaller screen display issues.
|
||||
width: unset;
|
||||
|
||||
// Status / Problems
|
||||
span.status
|
||||
{
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
<span v-if="assignment.problem" class="status entry-box" :style="{color: assignment.problemColor}">
|
||||
{{assignment.problem}}
|
||||
</span>
|
||||
<span class="percent entry-box">
|
||||
<span v-if="assignment.graded" class="percent entry-box">
|
||||
{{(assignment.score / assignment.scoreMax * 100).toFixed(1)}}
|
||||
<span class="symbol">%</span>
|
||||
</span>
|
||||
<span class="score entry-box">{{assignment.score}}</span>
|
||||
<span class="max entry-box">{{assignment.scoreMax}}</span>
|
||||
<span v-if="assignment.graded" class="score entry-box">{{assignment.score}}</span>
|
||||
<span v-if="assignment.graded" class="max entry-box">{{assignment.scoreMax}}</span>
|
||||
|
||||
<el-button class="mark-as-read" :class="unread ? 'unread' : 'no-unread'"
|
||||
size="mini" type="text" icon="el-icon-close"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-progress v-if="started" :text-inside="true" :percentage="progress()"
|
||||
:stroke-width="20" status="success" style="margin: 0 20px"/>
|
||||
|
||||
<el-dialog title="Notice" :visible.sync="clearUnreadPrompt"
|
||||
<el-dialog title="Notice" :visible.sync="clearUnreadPrompt" @close="clearUnread(false)"
|
||||
width="30%" style="word-break: unset;">
|
||||
<span>You have too many new grade notifications. Clear them now?</span>
|
||||
<img src="./too-many-unread.png" alt=""/>
|
||||
@@ -126,6 +126,7 @@
|
||||
|
||||
// Don't ask again
|
||||
this.$cookies.set('va.ignore-unread', true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear unread
|
||||
|
||||
Reference in New Issue
Block a user