File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/app/components/pages/quizzes Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,11 @@ const PracticeQuizzesComponent = ({user}: QuizzesPageProps) => {
29
29
const showQuiz = ( quiz : QuizSummaryDTO ) => {
30
30
switch ( user . role ) {
31
31
case "STUDENT" :
32
- // Tutors should see the same tests as students can
33
- // eslint-disable-next-line no-fallthrough
34
32
case "TUTOR" :
35
- return ( quiz . hiddenFromRoles && ! quiz . hiddenFromRoles ?. includes ( "STUDENT" ) ) || quiz . visibleToStudents ;
36
33
case "TEACHER" :
37
- return ( quiz . hiddenFromRoles && ! quiz . hiddenFromRoles ?. includes ( "TEACHER" ) ) ?? true ;
34
+ // Practice attempts are only possible on quizzes that are visible to students
35
+ // (most quizzes that are hidden from students may be previewed by teachers, but may not be practised)
36
+ return ( quiz . hiddenFromRoles && ! quiz . hiddenFromRoles ?. includes ( "STUDENT" ) ) || quiz . visibleToStudents ;
38
37
default :
39
38
return true ;
40
39
}
You can’t perform that action at this time.
0 commit comments