generalise a QuestionBase
This commit is contained in:
+2
-9
@@ -16,7 +16,7 @@ from sortedm2m.fields import SortedManyToManyField
|
||||
|
||||
import string
|
||||
|
||||
from generic.models import CidUser, CidUserGroup, ExamUserStatus, Examination, ExamBase, QuestionNote, UserAnswerBase, UserUserGroup
|
||||
from generic.models import CidUser, CidUserGroup, ExamUserStatus, Examination, ExamBase, QuestionBase, QuestionNote, UserAnswerBase, UserUserGroup
|
||||
|
||||
from collections import defaultdict
|
||||
from helpers.images import image_as_base64
|
||||
@@ -72,7 +72,7 @@ class QuestionType(models.Model):
|
||||
|
||||
|
||||
@reversion.register
|
||||
class AnatomyQuestion(models.Model):
|
||||
class AnatomyQuestion(QuestionBase):
|
||||
question_type = models.ForeignKey(
|
||||
QuestionType, on_delete=models.SET_NULL, null=True, default=1
|
||||
)
|
||||
@@ -114,11 +114,6 @@ class AnatomyQuestion(models.Model):
|
||||
structure = models.ForeignKey(
|
||||
Structure, on_delete=models.SET_NULL, null=True, blank=True
|
||||
)
|
||||
created_date = models.DateTimeField(default=timezone.now)
|
||||
|
||||
open_access = models.BooleanField(
|
||||
help_text="If a question should be freely available to browse", default=True
|
||||
)
|
||||
|
||||
author = models.ManyToManyField(
|
||||
settings.AUTH_USER_MODEL,
|
||||
@@ -127,8 +122,6 @@ class AnatomyQuestion(models.Model):
|
||||
related_name="anatomy_authored_questions",
|
||||
)
|
||||
|
||||
notes = GenericRelation(QuestionNote)
|
||||
|
||||
class Meta:
|
||||
permissions = ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user