This commit is contained in:
Ross
2021-12-15 20:04:37 +00:00
parent 25ac8762d9
commit d31b8efb16
2 changed files with 25 additions and 0 deletions
@@ -0,0 +1,18 @@
# Generated by Django 3.2.8 on 2021-12-15 20:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rapids', '0040_alter_exam_valid_users'),
]
operations = [
migrations.AddField(
model_name='ciduseranswer',
name='score',
field=models.CharField(blank=True, choices=[('', 'Unmarked'), ('0', 'Incorrect'), ('1', 'Half mark'), ('2', 'Correct')], default='', max_length=1),
),
]
+7
View File
@@ -654,6 +654,13 @@ class CidUserAnswer(models.Model):
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
score = models.CharField(
max_length=1,
choices=Answer.MarkOptions.choices,
default=Answer.MarkOptions.UNMARKED,
blank=True
)
def __str__(self):
try:
exam = self.exam