Skip to content

Commit

Permalink
simplify canSetFinalGrade #471
Browse files Browse the repository at this point in the history
  • Loading branch information
schefbi authored Nov 22, 2022
1 parent 9cd496a commit 75ca19b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/app/events/utils/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ export function getEventState(course: Course): Option<EventStateWithLabel> {
}

export function canSetFinalGrade(course: Course): boolean {
const { HasEvaluationStarted, EvaluationUntil } = course.EvaluationStatusRef;
return (
HasEvaluationStarted === true &&
((EvaluationUntil && EvaluationUntil >= new Date()) || !EvaluationUntil)
);
return course.EvaluationStatusRef.HasEvaluationStarted === true;
}

export function isRated(course: Course): boolean {
Expand Down

0 comments on commit 75ca19b

Please sign in to comment.