Skip to content

Commit

Permalink
Copy comment from SetQuizzes
Browse files Browse the repository at this point in the history
Co-authored-by: Sol  <94075844+sjd210@users.noreply.github.com>
  • Loading branch information
axlewin and sjd210 authored Oct 24, 2024
1 parent c4668c4 commit ac5a6c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/components/pages/quizzes/MyQuizzes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ const MyQuizzesPageComponent = ({user}: MyQuizzesPageProps) => {
}
};

// If the user is event admin or above, and the quiz is hidden from teachers, then show that
// Otherwise, show if the quiz is visible to students
const roleVisibilitySummary = (quiz: QuizSummaryDTO) => <>
{isEventLeaderOrStaff(user) && quiz.hiddenFromRoles && quiz.hiddenFromRoles?.includes("TEACHER") && <div className="small text-muted d-block ms-2">hidden from teachers</div>}
{isTutorOrAbove(user) && ((quiz.hiddenFromRoles && !quiz.hiddenFromRoles?.includes("STUDENT")) || quiz.visibleToStudents) && <div className="small text-muted d-block ms-2">visible to students</div>}
Expand Down

0 comments on commit ac5a6c1

Please sign in to comment.