Skip to content

Commit

Permalink
Improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnans2006 committed May 27, 2024
1 parent 0431c1f commit fae9885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tin/apps/assignments/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def grader_log_filename(self):
)

def quiz_open_for_student(self, student):
is_teacher = student in self.course.teacher.all()
is_teacher = self.course.teacher.filter(id=student.id).exists()
if is_teacher or student.is_superuser:
return True
return not (self.quiz_ended_for_student(student) or self.quiz_locked_for_student(student))
Expand Down

0 comments on commit fae9885

Please sign in to comment.