-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
RefactoringPurely internal changes for maintainabilityPurely internal changes for maintainability
Description
Issue:
A course's average data (gpa, enjoyability, etc.) should NOT be fetched on the fly. It needs to be stored within the course model itself, given an instructor and course. We can update these averages on the fly via the following calculation whenever a review is added:
let n = num_of_reviews
let avg = avg_of_some_field
avg += inputted_value / n
avg /= (n + 1)
avg *= n
This will allow us to not have to fetch reviews every time we need to display that data on the department page, course instructor page, or otherwise.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
RefactoringPurely internal changes for maintainabilityPurely internal changes for maintainability