Skip to content

Commit

Permalink
feat: update chat visibility (openedx#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
alangsto authored Mar 1, 2024
1 parent a91ef11 commit 54bb72b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/courseware/course/chat/Chat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,12 @@ const Chat = ({
const date = new Date();
const utcDate = date.toISOString();

const enrollmentStartDate = course.enrollmentStart || utcDate;
const startDate = course.start || enrollmentStartDate;
const enrollmentEndDate = course.enrollmentEnd || utcDate;
const endDate = course.end || enrollmentEndDate;
const startDate = course.start || utcDate;
const endDate = course.end || utcDate;

return (
startDate <= enrollmentStartDate
&& enrollmentStartDate <= utcDate
&& utcDate <= enrollmentEndDate
&& enrollmentEndDate <= endDate
startDate <= utcDate
&& utcDate <= endDate
);
};

Expand Down

0 comments on commit 54bb72b

Please sign in to comment.