numerous updates
This commit is contained in:
@@ -51,6 +51,7 @@ class AnatomyUserAnswerFilter(django_filters.FilterSet):
|
||||
model= CidUserAnswer
|
||||
fields = (
|
||||
"cid",
|
||||
#"user",
|
||||
"question",
|
||||
"answer",
|
||||
#"answer_compare",
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.13 on 2022-05-20 10:45
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('anatomy', '0060_exam_authors_only'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='exam',
|
||||
old_name='valid_users',
|
||||
new_name='valid_cid_users',
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,20 @@
|
||||
# Generated by Django 3.2.13 on 2022-05-20 12:42
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('anatomy', '0061_rename_valid_users_exam_valid_cid_users'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='exam',
|
||||
name='valid_user_users',
|
||||
field=models.ManyToManyField(blank=True, related_name='user_anatomy_exams', to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
||||
+9
-1
@@ -383,10 +383,14 @@ class Exam(ExamBase):
|
||||
related_name="anatomy_exam_author",
|
||||
)
|
||||
|
||||
valid_users = models.ManyToManyField(
|
||||
valid_cid_users = models.ManyToManyField(
|
||||
CidUser, blank=True, related_name="anatomy_exams"
|
||||
)
|
||||
|
||||
valid_user_users = models.ManyToManyField(
|
||||
settings.AUTH_USER_MODEL, blank=True, related_name="user_anatomy_exams"
|
||||
)
|
||||
|
||||
def get_exam_json(self, based=True):
|
||||
questions = self.exam_questions.all()
|
||||
|
||||
@@ -448,6 +452,10 @@ class CidUserAnswer(models.Model):
|
||||
help_text="Candidate ID (limitied by BigIntegerField size)",
|
||||
)
|
||||
|
||||
#user = models.ForeignKey(
|
||||
# settings.AUTH_USER_MODEL, on_delete=models.CASCADE, blank=True, null=True#, related_name="user_anatomy_user_answers"
|
||||
#)
|
||||
|
||||
# Each user answer is associated with a particular exam
|
||||
exam = models.ForeignKey(
|
||||
Exam, related_name="cid_user_answers", on_delete=models.CASCADE, null=True
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/home/ross/dv/dicomViewer.js
|
||||
File diff suppressed because it is too large
Load Diff
@@ -69,6 +69,7 @@ class AnatomyUserAnswerTable(tables.Table):
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = (
|
||||
"cid",
|
||||
#"user",
|
||||
"question",
|
||||
"answer",
|
||||
#"answer_compare",
|
||||
|
||||
Reference in New Issue
Block a user