Compare commits

...

16 Commits

Author SHA1 Message Date
Hykilpikonna 7c8bde24b3 [U] Release v0.5.4.1391 2020-03-07 16:55:27 -05:00
Hykilpikonna 158344f24f [F] Only average graded assignments in type average 2020-03-07 16:15:59 -05:00
Hykilpikonna 78159fda3f [S] Reverse alternating shading order 2020-03-07 16:13:03 -05:00
Hykilpikonna 8988e02793 [S] Fix assignment alignment issues on smaller screens 2020-03-07 16:12:24 -05:00
Hykilpikonna 6e7642e126 [S] Make min-width look better 2020-03-07 16:12:02 -05:00
Hykilpikonna 47bea6197a [S] Make bottom margin larger 2020-03-07 16:11:35 -05:00
Hykilpikonna ea17b3e9ea [S] Use alternating shading for gades 2020-03-07 16:11:23 -05:00
Hykilpikonna da719a0a6b [O] Treat close as clearUnread(false) 2020-03-07 16:10:57 -05:00
Hykilpikonna f654527311 [O] Only display grade if graded 2020-03-07 16:10:14 -05:00
Hykilpikonna 880dea1bef [F] Should display un-graded assignments too 2020-03-07 16:09:40 -05:00
Hykilpikonna 021915d9d4 [F] Include "incomplete" in GPA calculation 2020-03-07 16:08:53 -05:00
Hykilpikonna 1fb0102328 [F] NREQ shouldn't be graded 2020-03-07 16:08:19 -05:00
Hykilpikonna 1fc2a2adda [+] Support "incomplete" as a completion status 2020-03-07 16:08:15 -05:00
Hykilpikonna ddc1024611 [O] Support "pending" as a completion status 2020-03-07 16:06:56 -05:00
Hykilpikonna 1de041351c [O] Order completion status by id 2020-03-07 16:06:23 -05:00
Hykilpikonna f64cf0ad02 [F] Fix unread clearing issue 2020-03-05 18:25:42 -05:00
7 changed files with 30 additions and 16 deletions
+1 -1
View File
@@ -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
View File
@@ -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);
+2 -2
View File
@@ -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"
+2 -1
View File
@@ -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