mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-04-05 12:41:27 +00:00
fix: coorection démarrage
This commit is contained in:
@ -178,24 +178,4 @@ class Evaluation(models.Model):
|
||||
ordering = ['-date', '-created_at']
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name} - {self.speciality.name} ({self.school_class.atmosphere_name})"
|
||||
|
||||
|
||||
class StudentEvaluation(models.Model):
|
||||
"""
|
||||
Note d'un élève pour une évaluation.
|
||||
"""
|
||||
student = models.ForeignKey('Subscriptions.Student', on_delete=models.CASCADE, related_name='evaluation_scores')
|
||||
evaluation = models.ForeignKey(Evaluation, on_delete=models.CASCADE, related_name='student_scores')
|
||||
score = models.DecimalField(max_digits=5, decimal_places=2, null=True, blank=True)
|
||||
comment = models.TextField(blank=True)
|
||||
is_absent = models.BooleanField(default=False)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
class Meta:
|
||||
unique_together = ('student', 'evaluation')
|
||||
|
||||
def __str__(self):
|
||||
score_display = 'Absent' if self.is_absent else self.score
|
||||
return f"{self.student} - {self.evaluation.name}: {score_display}"
|
||||
return f"{self.name} - {self.speciality.name} ({self.school_class.atmosphere_name})"
|
||||
Reference in New Issue
Block a user