refactoring files to be located by feature

This commit is contained in:
2025-07-23 09:23:44 -06:00
parent 46e0c36916
commit c95c40f9e7
75 changed files with 279 additions and 303 deletions

View File

@@ -0,0 +1,12 @@
import { RubricItem } from "../rubricItem";
export const assignmentPoints = (rubric: RubricItem[]) => {
const basePoints = rubric
.map((r) => {
if (r.label.toLowerCase().includes("(extra credit)")) return 0;
if (r.points < 0) return 0; // don't count negative points towards the point totals
return r.points;
})
.reduce((acc, current) => (current > 0 ? acc + current : acc), 0);
return basePoints;
};