class Assignment(models.Model):
title = models.CharField(_('title'), max_length=128)
content = models.TextField(_('content'))
class Assignment(models.Model):
title = models.CharField(_('title'), max_length=128)
content = models.TextField(_('content'))
deadline = models.DateTimeField(_('deadline'))
max_points = models.IntegerField(_('max points'))
experts = models.ManyToManyField(User, verbose_name=_('experts'), related_name='stage2_assignments')
deadline = models.DateTimeField(_('deadline'))
max_points = models.IntegerField(_('max points'))
experts = models.ManyToManyField(User, verbose_name=_('experts'), related_name='stage2_assignments')
- return self.answer_set.exclude(mark__expert=expert).exclude(complete=True)
+ answers = self.answer_set.exclude(mark__expert=expert).exclude(complete=True)
+ if expert in self.arbiters.all():
+ answers = answers.filter(need_arbiter=True)
+ return answers