Newer
Older
_filter_related_only("participation__course"),
"require_login",
"usage_time",
)
date_hierarchy = "usage_time"
"participation__user__username",
"participation__user__first_name",
"participation__user__last_name",
)
# {{{ permissions
def get_queryset(self, request):
qs = super().get_queryset(request)
return _filter_participation_linked_obj_for_user(qs, request.user)
exclude = ("creator",)
def save_model(self, request, obj, form, change):
obj.creator = request.user
obj.save()
# }}}
@admin.action(
description=_("Revoke Exam Tickets")
)
def revoke_exam_tickets(self, request, queryset): # noqa
queryset \
.filter(state=exam_ticket_states.valid) \
.update(state=exam_ticket_states.revoked)
actions = [revoke_exam_tickets]
# vim: foldmethod=marker