Skip to content

Commit

Permalink
chore: Fix grade distributions for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mathhulk committed Oct 27, 2024
1 parent cecc0b6 commit 5df34bd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
20 changes: 10 additions & 10 deletions apps/backend/src/modules/grade-distribution/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ export const getGradeDistributionByCourse = async (
subject,
});

if (distributions.length === 0)
throw new Error("No grade distributions found");
// if (distributions.length === 0)
// throw new Error("No grade distributions found");

const distribution = getDistribution(distributions);

Expand Down Expand Up @@ -205,8 +205,8 @@ export const getGradeDistributionByClass = async (
classNumber: section.id,
});

if (distributions.length === 0)
throw new Error("No grade distributions found");
// if (distributions.length === 0)
// throw new Error("No grade distributions found");

const distribution = getDistribution(distributions);

Expand All @@ -233,8 +233,8 @@ export const getGradeDistributionBySemester = async (
termId: term.id,
});

if (distributions.length === 0)
throw new Error("No grade distributions found");
// if (distributions.length === 0)
// throw new Error("No grade distributions found");

const distribution = getDistribution(distributions);

Expand Down Expand Up @@ -264,8 +264,8 @@ export const getGradeDistributionByInstructor = async (
classNumber: { $in: sections.map((section) => section.id) },
});

if (distributions.length === 0)
throw new Error("No grade distributions found");
// if (distributions.length === 0)
// throw new Error("No grade distributions found");

const distribution = getDistribution(distributions);

Expand Down Expand Up @@ -300,8 +300,8 @@ export const getGradeDistributionByInstructorAndSemester = async (
classNumber: { $in: sections.map((section) => section.id) },
});

if (distributions.length === 0)
throw new Error("No grade distributions found");
// if (distributions.length === 0)
// throw new Error("No grade distributions found");

const distribution = getDistribution(distributions);

Expand Down
5 changes: 2 additions & 3 deletions apps/frontend/src/app/Schedule/Editor/SideBar/Class/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useMemo } from "react";

import { ArrowSeparateVertical, ArrowUnionVertical } from "iconoir-react";

import AverageGrade from "@/components/AverageGrade";
import Capacity from "@/components/Capacity";
import Units from "@/components/Units";
import { Component, IClass, componentMap } from "@/lib/api";
Expand Down Expand Up @@ -72,9 +71,9 @@ export default function Class({
{_class.title ?? _class.course.title}
</p>
<div className={styles.row}>
<AverageGrade
{/* <AverageGrade
gradeDistribution={_class.course.gradeDistribution}
/>
/> */}
<Capacity
enrollCount={_class.primarySection.enrollCount}
enrollMax={_class.primarySection.enrollMax}
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"lint": {},
"start": {
"dependsOn": ["generate"]
"dependsOn": ["generate", "^build"]
},
"dev": {
"cache": false,
Expand Down

0 comments on commit 5df34bd

Please sign in to comment.