aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/assessments/models.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-03-17 17:07:11 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-03-17 17:07:11 +0000
commit456da293617ebed027ac4a35f4dd853854982b29 (patch)
tree8f573f49f709d6ae8714761d09cd77bef749f8c5 /ctrack/assessments/models.py
parentb315e9569a1609f2144821be7459e80687fe584b (diff)
adding all the Contributing Outcomes scores for a single CAF in populate script
Diffstat (limited to 'ctrack/assessments/models.py')
-rw-r--r--ctrack/assessments/models.py11
1 files changed, 11 insertions, 0 deletions
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}"