Newer
Older
default=False,
help_text=_("If set, the exam ticket can only be used once logged in"))
class Meta:
verbose_name = _("Exam ticket")
verbose_name_plural = _("Exam tickets")
ordering = ("exam__course", "-creation_time")
permissions = (
("can_issue_exam_tickets", _("Can issue exam tickets to student")),
)
return _("Exam ticket for %(participation)s in %(exam)s") % {
"participation": self.participation,
"exam": self.exam,
super().clean()
try:
if self.exam.course != self.participation.course:
raise ValidationError(_("Participation and exam must live "
"in the same course"))
except ObjectDoesNotExist:
pass
# vim: foldmethod=marker