[F] Fix weight errors when the calculated grade equals the supposed grade
This commit is contained in:
@@ -151,15 +151,6 @@ export default class App extends Vue
|
|||||||
|
|
||||||
// Loop through all the courses
|
// Loop through all the courses
|
||||||
for (const course of this.filteredCourses)
|
for (const course of this.filteredCourses)
|
||||||
{
|
|
||||||
let termGrade = +GPAUtils.getTotalMeanAverage(course.computed.termAssignments[Constants.CURRENT_TERM]).toFixed(2);
|
|
||||||
|
|
||||||
// Check if total-average grade is the same with percent-type grade
|
|
||||||
if (course.rawNumericGrade == termGrade)
|
|
||||||
{
|
|
||||||
course.grading = {method: 'TOTAL_MEAN', weightingMap: {}};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// Request grading scheme for this course
|
// Request grading scheme for this course
|
||||||
App.http.post('/grading', {'assignmentsId': course.assignmentsId}).then(response =>
|
App.http.post('/grading', {'assignmentsId': course.assignmentsId}).then(response =>
|
||||||
@@ -174,7 +165,6 @@ export default class App extends Vue
|
|||||||
})
|
})
|
||||||
.catch(e => this.showError(`Error: Grading data failed to load.\n(${e})`))
|
.catch(e => this.showError(`Error: Grading data failed to load.\n(${e})`))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Wait for done
|
// Wait for done
|
||||||
pWaitFor(() => this.filteredCourses.every(c => c.grading != undefined)).then(() =>
|
pWaitFor(() => this.filteredCourses.every(c => c.grading != undefined)).then(() =>
|
||||||
|
|||||||
Reference in New Issue
Block a user