stephenneale / seng371-group16

Contains Group 16's work for SENG371 A02 - Group 16, Spring 2023
0 stars 1 forks source link

Implement grade weights + cumulative grade #57

Closed matt-lebl closed 1 year ago

matt-lebl commented 1 year ago

Frontend

A new weight field will be added to API responses alongside grades where appropriate. This will be a value between 0 and 1, representing the contribution of that item's grade to the total grade of the course. Using this value in combination with the grades of each item, calculate the total cumulative grade achieved to date. Where a grade item is listed but no grade is assigned, assume the grade is 0%.

Backend

Add weight field to each grade item, and return this weight field in API responses where the grade is returned.

matt-lebl commented 1 year ago

just added a new thing

{
    "comment": null,
    "itemName": "Quiz 2",
    "markDenominator": 5.0,
    "markNumerator": null,
    "percentage": null,
    "weight": 0.01
}
stephenneale commented 1 year ago

Added my implementation here, cumulative weights are calculated on loading the "Grades" page and displayed appropriately 😄