From 40cfe714e880af7b3b1496191c651736959d1ce8 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 19 Mar 2021 11:20:47 +0000 Subject: [PATCH] . --- anatomy/migrations/0036_exam_exam_mode.py | 18 ++++++++++++++++++ generic/models.py | 4 ++++ longs/migrations/0032_exam_exam_mode.py | 18 ++++++++++++++++++ longs/models.py | 2 +- physics/migrations/0005_exam_exam_mode.py | 18 ++++++++++++++++++ rapids/migrations/0021_exam_exam_mode.py | 18 ++++++++++++++++++ 6 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 anatomy/migrations/0036_exam_exam_mode.py create mode 100644 longs/migrations/0032_exam_exam_mode.py create mode 100644 physics/migrations/0005_exam_exam_mode.py create mode 100644 rapids/migrations/0021_exam_exam_mode.py diff --git a/anatomy/migrations/0036_exam_exam_mode.py b/anatomy/migrations/0036_exam_exam_mode.py new file mode 100644 index 00000000..99cf1cce --- /dev/null +++ b/anatomy/migrations/0036_exam_exam_mode.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.3 on 2021-03-19 11:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('anatomy', '0035_exam_json_creation_time'), + ] + + operations = [ + migrations.AddField( + model_name='exam', + name='exam_mode', + field=models.BooleanField(default=True, help_text='If an exam should be take in exam_mode'), + ), + ] diff --git a/generic/models.py b/generic/models.py index 95ffdb55..01d29e30 100644 --- a/generic/models.py +++ b/generic/models.py @@ -56,6 +56,10 @@ class ExamBase(models.Model): help_text="If an exam should be available", default=True ) + exam_mode = models.BooleanField( + help_text="If an exam should be take in exam_mode", default=True + ) + publish_results = models.BooleanField( help_text="If an exams results should be available", default=True ) diff --git a/longs/migrations/0032_exam_exam_mode.py b/longs/migrations/0032_exam_exam_mode.py new file mode 100644 index 00000000..a28dfc07 --- /dev/null +++ b/longs/migrations/0032_exam_exam_mode.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.3 on 2021-03-19 11:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('longs', '0031_auto_20210309_1527'), + ] + + operations = [ + migrations.AddField( + model_name='exam', + name='exam_mode', + field=models.BooleanField(default=True, help_text='If an exam should be take in exam_mode'), + ), + ] diff --git a/longs/models.py b/longs/models.py index 394e18a9..2e6ddc75 100644 --- a/longs/models.py +++ b/longs/models.py @@ -120,7 +120,7 @@ class Long(models.Model): help_text="If the json cache needs updating", default=False ) - json_creation_time = models.DateTimeField(blank=True, default=None) + json_creation_time = models.DateTimeField(blank=True, default=None, null=True) #question_file = models.FileField(upload_to=question_file_directory_path, blank=True, null=True) diff --git a/physics/migrations/0005_exam_exam_mode.py b/physics/migrations/0005_exam_exam_mode.py new file mode 100644 index 00000000..63fac45a --- /dev/null +++ b/physics/migrations/0005_exam_exam_mode.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.3 on 2021-03-19 11:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('physics', '0004_exam_json_creation_time'), + ] + + operations = [ + migrations.AddField( + model_name='exam', + name='exam_mode', + field=models.BooleanField(default=True, help_text='If an exam should be take in exam_mode'), + ), + ] diff --git a/rapids/migrations/0021_exam_exam_mode.py b/rapids/migrations/0021_exam_exam_mode.py new file mode 100644 index 00000000..58c6ce76 --- /dev/null +++ b/rapids/migrations/0021_exam_exam_mode.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.3 on 2021-03-19 11:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('rapids', '0020_exam_json_creation_time'), + ] + + operations = [ + migrations.AddField( + model_name='exam', + name='exam_mode', + field=models.BooleanField(default=True, help_text='If an exam should be take in exam_mode'), + ), + ]