.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.2.8 on 2021-12-11 22:12
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('generic', '0015_ciduser_ciduserexam'),
|
||||
('anatomy', '0053_anatomyquestion_structure'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='exam',
|
||||
name='valid_users',
|
||||
field=models.ManyToManyField(blank=True, related_name='anatomy_exams', to='generic.CidUser'),
|
||||
),
|
||||
]
|
||||
+3
-1
@@ -15,7 +15,7 @@ from sortedm2m.fields import SortedManyToManyField
|
||||
|
||||
import string
|
||||
|
||||
from generic.models import Examination, ExamBase, QuestionNote
|
||||
from generic.models import CidUser, Examination, ExamBase, QuestionNote
|
||||
|
||||
from collections import defaultdict
|
||||
from helpers.images import image_as_base64
|
||||
@@ -354,6 +354,8 @@ class Exam(ExamBase):
|
||||
related_name="anatomy_exam_author",
|
||||
)
|
||||
|
||||
valid_users = models.ManyToManyField(CidUser, blank=True, related_name="anatomy_exams")
|
||||
|
||||
def get_exam_json(self, based=True):
|
||||
questions = self.exam_questions.all()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user