Newer
Older
"exam",
"participation",
"state",
"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(ExamTicketAdmin, self).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()
# }}}
def revoke_exam_tickets(self, request, queryset): # noqa
queryset \
.filter(state=exam_ticket_states.valid) \
.update(state=exam_ticket_states.revoked)
Andreas Klöckner
committed
revoke_exam_tickets.short_description = _("Revoke Exam Tickets") # type: ignore
admin.site.register(ExamTicket, ExamTicketAdmin)
# }}}
# vim: foldmethod=marker