From 456da293617ebed027ac4a35f4dd853854982b29 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 17 Mar 2020 17:07:11 +0000 Subject: adding all the Contributing Outcomes scores for a single CAF in populate script --- ctrack/assessments/models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ctrack/assessments/models.py') diff --git a/ctrack/assessments/models.py b/ctrack/assessments/models.py index 07f3813..71525bb 100644 --- a/ctrack/assessments/models.py +++ b/ctrack/assessments/models.py @@ -18,6 +18,7 @@ class CAFSelfAssessment(models.Model): def __str__(self): return f"CAF Self Assessment for {self.caf.applicable_systems.first().organisation.name} - version {self.caf.version}" + class CAFObjective(models.Model): """ One of 4 as set out in the framework... @@ -72,8 +73,18 @@ class CAFSelfAssessmentOutcomeScore(models.Model): Details the assessment for an Outcome, and the baseline assessment. Completed by an OES initially, but can be completed by anyone. """ + ASSESSMENT_SCORE = ( + ("Achieved", "Achieved"), + ("Partially Achieved", "Partially Achieved"), + ("Not Achieved", "Not Achieved"), + ) caf_self_assessment = models.ForeignKey(CAFSelfAssessment, on_delete=models.CASCADE) caf_contributing_outcome = models.ForeignKey(CAFContributingOutcome, on_delete=models.CASCADE) + self_assessment_score = models.CharField(max_length=20, choices=ASSESSMENT_SCORE, help_text="Choose an assessment score") + baseline_assessment_score = models.CharField(max_length=20, choices=ASSESSMENT_SCORE, help_text="Choose an assessment score") class Meta: verbose_name = "CAF Self Assessment Outcome Score" + + def __str__(self): + return f"{self.caf_self_assessment} | {self.self_assessment_score}" -- cgit v1.2.3