diff --git a/training/models.py b/training/models.py index b03c7863..845daa9f 100644 --- a/training/models.py +++ b/training/models.py @@ -10,6 +10,9 @@ class Trainee(Profile): class Meta: proxy = True + def started_levels(self): + return [level for level in TrainingLevel.objects.all() if level.percentage_complete(self) > 0] + def level_qualifications(self, only_confirmed=False): levels = self.levels.all() if only_confirmed: @@ -219,7 +222,7 @@ class TrainingLevelQualification(models.Model): reversion_hide = True def __str__(self): - return "{} qualified as a {}".format(self.trainee, self.level) + return "{} is qualified as a {}".format(self.trainee, self.level) class Meta: unique_together = ["trainee", "level"] diff --git a/training/templates/trainee_detail.html b/training/templates/trainee_detail.html index 15bcf89c..0e7eac18 100644 --- a/training/templates/trainee_detail.html +++ b/training/templates/trainee_detail.html @@ -53,11 +53,19 @@
{{ level.description|truncatewords:30 }}
@@ -82,9 +90,6 @@ {% endif %}No progress in any levels yet...did someone forget to fill out the paperwork?
{% endfor %}