code: def get_queryset(self, request):
          ''' Restrict the listed assignments for the current user.'''
          qs = super(AssignmentAdmin, self).get_queryset(request)
          if not request.user.is_superuser:
              qs = qs.filter(course__active=True).filter(Q(course__tutors__pk=request.user.pk) | Q(course__owner=request.user)).distinct()
          return qs.order_by('title'f get_queryset(self, request):
          ''' Restrict the listed assignments for the current user.'''
          qs = super(AssignmentAdmin, self).get_queryset(request)
          if not request.user.is_superuser:
              qs = qs.filter(course__active=True).filter(Q(course__tutors__pk=request.user.pk) | Q(course__owner=request.user)).distinct()
          return qs.order_by('title')
docs: Restrict the listed assignments for the current user.