From 726d7c576bf917f9b4246de9b67de22640abf141 Mon Sep 17 00:00:00 2001 From: Vasilenko Ilia Date: Sat, 6 Feb 2021 11:37:54 +0300 Subject: [PATCH] change back --- TasksType.json | 78 +++++++++++++++ lessons/__pycache__/gqlTypes.cpython-37.pyc | Bin 5875 -> 6271 bytes lessons/__pycache__/models.cpython-37.pyc | Bin 3946 -> 3917 bytes lessons/__pycache__/schema.cpython-37.pyc | Bin 16142 -> 17991 bytes lessons/gqlTypes.py | 12 ++- lessons/migrations/0001_initial.py | 94 +++++++++++++++++- lessons/migrations/0002_auto_20210109_1220.py | 91 ----------------- lessons/migrations/0002_auto_20210205_1326.py | 38 +++++++ lessons/migrations/0003_auto_20210205_1541.py | 26 +++++ lessons/migrations/0004_answer_completed.py | 18 ---- lessons/migrations/0004_auto_20210205_1543.py | 18 ++++ lessons/migrations/0005_auto_20210117_1752.py | 23 ----- lessons/migrations/0005_auto_20210205_1544.py | 19 ++++ lessons/migrations/0006_auto_20210117_2008.py | 23 ----- lessons/migrations/0006_auto_20210205_1848.py | 19 ++++ lessons/migrations/0007_auto_20210205_1857.py | 19 ++++ lessons/migrations/0007_lesson_time_lesson.py | 18 ---- ...113_2224.py => 0008_auto_20210205_1858.py} | 10 +- lessons/migrations/0008_materials_lesson.py | 19 ---- lessons/migrations/0009_lesson_content.py | 18 ---- lessons/migrations/0010_auto_20210203_0122.py | 23 ----- .../__pycache__/0001_initial.cpython-36.pyc | Bin 1136 -> 0 bytes .../__pycache__/0001_initial.cpython-37.pyc | Bin 1134 -> 2559 bytes .../0002_auto_20210109_1220.cpython-36.pyc | Bin 1932 -> 0 bytes .../0002_auto_20210109_1220.cpython-37.pyc | Bin 1920 -> 0 bytes .../0002_auto_20210205_1326.cpython-37.pyc | Bin 0 -> 812 bytes .../0003_auto_20210113_2224.cpython-37.pyc | Bin 635 -> 0 bytes .../0003_auto_20210205_1541.cpython-37.pyc | Bin 0 -> 859 bytes .../0004_answer_completed.cpython-37.pyc | Bin 579 -> 0 bytes .../0004_auto_20210205_1543.cpython-37.pyc | Bin 0 -> 597 bytes .../0005_auto_20210117_1752.cpython-37.pyc | Bin 626 -> 0 bytes .../0005_auto_20210205_1544.cpython-37.pyc | Bin 0 -> 680 bytes .../0006_auto_20210117_2008.cpython-37.pyc | Bin 610 -> 0 bytes .../0006_auto_20210205_1848.cpython-37.pyc | Bin 0 -> 677 bytes .../0007_auto_20210205_1857.cpython-37.pyc | Bin 0 -> 677 bytes .../0007_lesson_time_lesson.cpython-37.pyc | Bin 585 -> 0 bytes .../0008_auto_20210205_1858.cpython-37.pyc | Bin 0 -> 629 bytes .../0008_materials_lesson.cpython-37.pyc | Bin 697 -> 0 bytes .../0009_lesson_content.cpython-37.pyc | Bin 571 -> 0 bytes .../0010_auto_20210203_0122.cpython-37.pyc | Bin 653 -> 0 bytes .../__pycache__/__init__.cpython-36.pyc | Bin 147 -> 0 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 155 -> 155 bytes lessons/models.py | 18 +++- lessons/schema.py | 88 +++++++++++++--- 44 files changed, 416 insertions(+), 256 deletions(-) create mode 100644 TasksType.json delete mode 100644 lessons/migrations/0002_auto_20210109_1220.py create mode 100644 lessons/migrations/0002_auto_20210205_1326.py create mode 100644 lessons/migrations/0003_auto_20210205_1541.py delete mode 100644 lessons/migrations/0004_answer_completed.py create mode 100644 lessons/migrations/0004_auto_20210205_1543.py delete mode 100644 lessons/migrations/0005_auto_20210117_1752.py create mode 100644 lessons/migrations/0005_auto_20210205_1544.py delete mode 100644 lessons/migrations/0006_auto_20210117_2008.py create mode 100644 lessons/migrations/0006_auto_20210205_1848.py create mode 100644 lessons/migrations/0007_auto_20210205_1857.py delete mode 100644 lessons/migrations/0007_lesson_time_lesson.py rename lessons/migrations/{0003_auto_20210113_2224.py => 0008_auto_20210205_1858.py} (57%) delete mode 100644 lessons/migrations/0008_materials_lesson.py delete mode 100644 lessons/migrations/0009_lesson_content.py delete mode 100644 lessons/migrations/0010_auto_20210203_0122.py delete mode 100644 lessons/migrations/__pycache__/0001_initial.cpython-36.pyc delete mode 100644 lessons/migrations/__pycache__/0002_auto_20210109_1220.cpython-36.pyc delete mode 100644 lessons/migrations/__pycache__/0002_auto_20210109_1220.cpython-37.pyc create mode 100644 lessons/migrations/__pycache__/0002_auto_20210205_1326.cpython-37.pyc delete mode 100644 lessons/migrations/__pycache__/0003_auto_20210113_2224.cpython-37.pyc create mode 100644 lessons/migrations/__pycache__/0003_auto_20210205_1541.cpython-37.pyc delete mode 100644 lessons/migrations/__pycache__/0004_answer_completed.cpython-37.pyc create mode 100644 lessons/migrations/__pycache__/0004_auto_20210205_1543.cpython-37.pyc delete mode 100644 lessons/migrations/__pycache__/0005_auto_20210117_1752.cpython-37.pyc create mode 100644 lessons/migrations/__pycache__/0005_auto_20210205_1544.cpython-37.pyc delete mode 100644 lessons/migrations/__pycache__/0006_auto_20210117_2008.cpython-37.pyc create mode 100644 lessons/migrations/__pycache__/0006_auto_20210205_1848.cpython-37.pyc create mode 100644 lessons/migrations/__pycache__/0007_auto_20210205_1857.cpython-37.pyc delete mode 100644 lessons/migrations/__pycache__/0007_lesson_time_lesson.cpython-37.pyc create mode 100644 lessons/migrations/__pycache__/0008_auto_20210205_1858.cpython-37.pyc delete mode 100644 lessons/migrations/__pycache__/0008_materials_lesson.cpython-37.pyc delete mode 100644 lessons/migrations/__pycache__/0009_lesson_content.cpython-37.pyc delete mode 100644 lessons/migrations/__pycache__/0010_auto_20210203_0122.cpython-37.pyc delete mode 100644 lessons/migrations/__pycache__/__init__.cpython-36.pyc diff --git a/TasksType.json b/TasksType.json new file mode 100644 index 0000000..b1156f8 --- /dev/null +++ b/TasksType.json @@ -0,0 +1,78 @@ +[ + { + "model": "lessons.TaskType", + "pk":1, + "fields" : { + "name":"прочитать текст" + } + }, + { + "model": "lessons.TaskType", + "pk":10, + "fields" : { + "name":"выбрать правильный вариант ответа" + } + }, + { + "model": "lessons.TaskType", + "pk":9, + "fields" : { + "name":"расставить заголвки" + + } + }, + { + "model": "lessons.TaskType", + "pk":8, + "fields": { + "name":"правда/ложь" + } + }, + { + "model": "lessons.TaskType", + "pk":7, + "fields" : { + "name":"краткий письменный ответ" + + } + }, + { + "model": "lessons.TaskType", + "pk":6, + "fields" : { + "name":"опишите устно изображение" + + } + }, + { + "model": "lessons.TaskType", + "pk":5, + "fields" : { + "name":"установите соответствия" + + } + }, + { + "model": "lessons.TaskType", + "pk":4, + "fields" : { + "name":"расширенный письменный ответ" + } + }, + { + "model": "lessons.TaskType", + "pk":3, + "fields" : { + "name":"монологическое высказывание на выбранную тему" + + } + }, + { + "model": "lessons.TaskType", + "pk":2, + "fields" : { + "name":"загрузка файла" + + } + } +] \ No newline at end of file diff --git a/lessons/__pycache__/gqlTypes.cpython-37.pyc b/lessons/__pycache__/gqlTypes.cpython-37.pyc index 5a5d4c0ce0db7371308fc39aee95797a16513e45..258ea64b5c30d7381d94aaeb95074ea19df965ae 100644 GIT binary patch literal 6271 zcmcIoOLH5?5#A@TSiC{-B}x`7SxJysOr?^_LvbA1j4dajV5h`frdS29FhdIDE&$Jf za>S%6sgjR5q*6X4RX#{Z|E0O+->MBqp_}9a@o1?8qTbn9P_3VbVs7~rpgEXQwvKBQ-Q|WV|5v`MTRnCVS(I(kc zWiQ-{w#l|C7s4CS4%sn{hX(a&@iT)KnR$Big-vdOrbNr2DQnGZpsCO*XsTLs8#Faq z2TfgTilAxGHPEbSO$#(lx(=Fkt$7_Z8*~#in_6=RG+T5VG}~Hp7c@8M4rq3?<_&5- zHrhA8LXUR70xufvg3LcYe{#xtW0^Z(LJSA8t`+-XAjHA27lhJ1WMV9&a~Oy-S$t<8 zK4tvzQ^ufC{2&XDf-&R$AQaNWT8Ga^tZm7{{?mR)@j(_3SY5;s6F1K?s13)};+0ryxhEMij|T;oVDnMbC*m9%fA+B2It z%stH=n z`r$JX96o6y??AEB zcK9}qfNtbFC{R5eH7>o5x(yIDxCHvnGu3m(r<0g`7b+}{33Fb$uMCo-Hg!HTz{@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r2hXk99RM1Ag9{F&vcJR?A!zT@cRpT?i1fwhV;yJ3@b?|2q2fR(~gJLMs~K zZ~fowc#5?55y=r~c{)U@pC;ClNJkso9(bHBiNKL?xLgS)B`1{J*z=-Rx+x;pgPNM* z$-#5MCBm=ZG6CLi8efMygZ1HMI;?|>Kf?|{3*e#k{b(h&yVjLO6;YmRDC9b8Sv1 z6-Oe&k*MOV(y$N97EUUhOE`XUOuC^k(pIN%nyq{lNl{79XD;zD{BUGn|1~_=_EGNL z5)&V#si*C1b|LeKRl5Hi)rE1KyrHq-!pVfqlKJ7p=ppu;aF-CjQs%Dek@+<^FcxC( z!zY>_E{}b$t~8a3`Y~$A^9z}&STFP)*chWOY*v;!cAN$#r$%a4T6WrY?9vH!KhsE9 zRy=ueK5fOFg?On^&O+;W{V??m)1TxvcKUcWcRpn&op>^x$Ywcx4JJ*(|7SUHdA#vS z>I|lD`&~|-wCUS^i_^E4)-SaXjk!wuR!?Vo<`AOQo`shPep|7EEzp|1361%G__t`(wSE*EEQ>M(V3TV zlEmLeDn^1Y$M$b{4oQq%hpNLTr>PV~_Bkb-&k~{Ba!Qg&ib#S;DyJ4D!q3HrPf->@ zEqacN0ywq2X!9HJqr*dN3O+mBAMqQ0qr&hRhEZeS4@g`-qtd9xz1pZXT8-fU01TU- AA^-pY diff --git a/lessons/gqlTypes.py b/lessons/gqlTypes.py index 1d444d5..f201eff 100644 --- a/lessons/gqlTypes.py +++ b/lessons/gqlTypes.py @@ -1,7 +1,7 @@ import graphene import graphene_django -from .models import Subject, Lesson, SubjectClassLocal, Tests, Task, AnswerSheet, Answer, Materials +from .models import Subject, Lesson, SubjectClassLocal, Tests, Task, AnswerSheet, Answer, Materials, TaskType as taskType from organisations.gqlTypes import ChildType, TeacherType from organisations.models import Organisation, Group, Child, Teacher @@ -16,6 +16,11 @@ from django.db.models import Model class Material(graphene_django.DjangoObjectType): class Meta: model = Materials + interfaces = (relay.Node,) + filter_fields = { + "name": ("exact",) + } + class AnswerType(graphene_django.DjangoObjectType): class Meta: @@ -144,3 +149,8 @@ class LocalSubjectType(graphene_django.DjangoObjectType): return len(self.lesson_set.all()) +class TaskTypeType(graphene_django.DjangoObjectType): + class Meta: + model = taskType + interfaces = (relay.Node,) + filter_fields = {} \ No newline at end of file diff --git a/lessons/migrations/0001_initial.py b/lessons/migrations/0001_initial.py index 7f712da..72c728f 100644 --- a/lessons/migrations/0001_initial.py +++ b/lessons/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.1.5 on 2021-01-08 20:17 +# Generated by Django 3.1.5 on 2021-02-05 08:53 from django.db import migrations, models import django.db.models.deletion @@ -9,10 +9,20 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('organisations', '0004_auto_20210108_2013'), + ('organisations', '0005_auto_20210120_1944'), ] operations = [ + migrations.CreateModel( + name='Lesson', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.TextField(default='')), + ('descr', models.TextField(default='')), + ('content', models.TextField(default='')), + ('time_lesson', models.DateTimeField(auto_now=True)), + ], + ), migrations.CreateModel( name='Subject', fields=[ @@ -22,6 +32,50 @@ class Migration(migrations.Migration): ('teachers_give', models.ManyToManyField(to='organisations.Teacher')), ], ), + migrations.CreateModel( + name='Task', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('theory', models.TextField()), + ('practise', models.TextField()), + ('number', models.IntegerField()), + ('max_score', models.IntegerField(default=0)), + ], + ), + migrations.CreateModel( + name='Type', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.TextField(max_length=150)), + ], + ), + migrations.CreateModel( + name='Theme', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=150)), + ('tasks', models.ManyToManyField(to='lessons.Task')), + ], + ), + migrations.CreateModel( + name='Tests', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=150)), + ('deadline', models.DateTimeField()), + ('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.lesson')), + ], + ), + migrations.AddField( + model_name='task', + name='test', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.tests'), + ), + migrations.AddField( + model_name='task', + name='types', + field=models.ManyToManyField(to='lessons.Type'), + ), migrations.CreateModel( name='SubjectClassLocal', fields=[ @@ -32,4 +86,40 @@ class Migration(migrations.Migration): ('teachers', models.ManyToManyField(to='organisations.Teacher')), ], ), + migrations.CreateModel( + name='Materials', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('link', models.URLField()), + ('name', models.CharField(blank=True, max_length=100)), + ('data', models.TextField(blank=True)), + ('Type', models.CharField(default='link', max_length=100)), + ('lesson', models.ForeignKey(default=3, on_delete=django.db.models.deletion.CASCADE, to='lessons.lesson')), + ], + ), + migrations.AddField( + model_name='lesson', + name='type_lesson', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.subjectclasslocal'), + ), + migrations.CreateModel( + name='AnswerSheet', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('completed', models.BooleanField(default=False)), + ('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.child')), + ('test', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.tests')), + ], + ), + migrations.CreateModel( + name='Answer', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('content', models.TextField()), + ('number', models.IntegerField()), + ('completed', models.BooleanField(default=False)), + ('score', models.IntegerField(default=0)), + ('sheet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.answersheet')), + ], + ), ] diff --git a/lessons/migrations/0002_auto_20210109_1220.py b/lessons/migrations/0002_auto_20210109_1220.py deleted file mode 100644 index 566d0ec..0000000 --- a/lessons/migrations/0002_auto_20210109_1220.py +++ /dev/null @@ -1,91 +0,0 @@ -# Generated by Django 3.1.5 on 2021-01-09 12:20 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('organisations', '0004_auto_20210108_2013'), - ('lessons', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Lesson', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('type_lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.subjectclasslocal')), - ], - ), - migrations.CreateModel( - name='Materials', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('link', models.URLField()), - ('name', models.CharField(blank=True, max_length=100)), - ], - ), - migrations.CreateModel( - name='Task', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('theory', models.TextField()), - ('practise', models.TextField()), - ('number', models.IntegerField()), - ], - ), - migrations.CreateModel( - name='Type', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.TextField(max_length=150)), - ], - ), - migrations.CreateModel( - name='Theme', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=150)), - ('tasks', models.ManyToManyField(to='lessons.Task')), - ], - ), - migrations.CreateModel( - name='Tests', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=150)), - ('deadline', models.DateTimeField()), - ('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.lesson')), - ], - ), - migrations.AddField( - model_name='task', - name='test', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.tests'), - ), - migrations.AddField( - model_name='task', - name='type', - field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='lessons.type'), - ), - migrations.CreateModel( - name='AnswerSheet', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('completed', models.BooleanField(default=False)), - ('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.child')), - ('test', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.tests')), - ], - ), - migrations.CreateModel( - name='Answer', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('content', models.TextField()), - ('number', models.IntegerField()), - ('sheet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.answersheet')), - ], - ), - ] diff --git a/lessons/migrations/0002_auto_20210205_1326.py b/lessons/migrations/0002_auto_20210205_1326.py new file mode 100644 index 0000000..ce7fa14 --- /dev/null +++ b/lessons/migrations/0002_auto_20210205_1326.py @@ -0,0 +1,38 @@ +# Generated by Django 3.1.5 on 2021-02-05 10:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('lessons', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='task', + name='Type', + field=models.CharField(default='line', max_length=150), + ), + migrations.AddField( + model_name='task', + name='autoCheckData', + field=models.TextField(blank=True), + ), + migrations.AddField( + model_name='task', + name='is_autoCheck', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='task', + name='is_timing', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='task', + name='time', + field=models.IntegerField(default=30), + ), + ] diff --git a/lessons/migrations/0003_auto_20210205_1541.py b/lessons/migrations/0003_auto_20210205_1541.py new file mode 100644 index 0000000..e22c6ea --- /dev/null +++ b/lessons/migrations/0003_auto_20210205_1541.py @@ -0,0 +1,26 @@ +# Generated by Django 3.1.5 on 2021-02-05 12:41 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('lessons', '0002_auto_20210205_1326'), + ] + + operations = [ + migrations.CreateModel( + name='TaskType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.TextField()), + ], + ), + migrations.AlterField( + model_name='task', + name='Type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.tasktype'), + ), + ] diff --git a/lessons/migrations/0004_answer_completed.py b/lessons/migrations/0004_answer_completed.py deleted file mode 100644 index ab1334f..0000000 --- a/lessons/migrations/0004_answer_completed.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1.5 on 2021-01-13 20:17 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('lessons', '0003_auto_20210113_2224'), - ] - - operations = [ - migrations.AddField( - model_name='answer', - name='completed', - field=models.BooleanField(default=False), - ), - ] diff --git a/lessons/migrations/0004_auto_20210205_1543.py b/lessons/migrations/0004_auto_20210205_1543.py new file mode 100644 index 0000000..643b2a9 --- /dev/null +++ b/lessons/migrations/0004_auto_20210205_1543.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2021-02-05 12:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('lessons', '0003_auto_20210205_1541'), + ] + + operations = [ + migrations.AlterField( + model_name='task', + name='Type', + field=models.CharField(default='line', max_length=150), + ), + ] diff --git a/lessons/migrations/0005_auto_20210117_1752.py b/lessons/migrations/0005_auto_20210117_1752.py deleted file mode 100644 index 08be77e..0000000 --- a/lessons/migrations/0005_auto_20210117_1752.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.1.5 on 2021-01-17 14:52 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('lessons', '0004_answer_completed'), - ] - - operations = [ - migrations.AddField( - model_name='answer', - name='score', - field=models.IntegerField(default=0), - ), - migrations.AddField( - model_name='task', - name='max_score', - field=models.IntegerField(default=0), - ), - ] diff --git a/lessons/migrations/0005_auto_20210205_1544.py b/lessons/migrations/0005_auto_20210205_1544.py new file mode 100644 index 0000000..a2ec8ed --- /dev/null +++ b/lessons/migrations/0005_auto_20210205_1544.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.5 on 2021-02-05 12:44 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('lessons', '0004_auto_20210205_1543'), + ] + + operations = [ + migrations.AlterField( + model_name='task', + name='Type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.tasktype'), + ), + ] diff --git a/lessons/migrations/0006_auto_20210117_2008.py b/lessons/migrations/0006_auto_20210117_2008.py deleted file mode 100644 index eb57052..0000000 --- a/lessons/migrations/0006_auto_20210117_2008.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.1.5 on 2021-01-17 17:08 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('lessons', '0005_auto_20210117_1752'), - ] - - operations = [ - migrations.AddField( - model_name='lesson', - name='descr', - field=models.TextField(default=''), - ), - migrations.AddField( - model_name='lesson', - name='name', - field=models.TextField(default=''), - ), - ] diff --git a/lessons/migrations/0006_auto_20210205_1848.py b/lessons/migrations/0006_auto_20210205_1848.py new file mode 100644 index 0000000..f1facd5 --- /dev/null +++ b/lessons/migrations/0006_auto_20210205_1848.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.5 on 2021-02-05 15:48 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('lessons', '0005_auto_20210205_1544'), + ] + + operations = [ + migrations.AlterField( + model_name='task', + name='test', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='lessons.tests'), + ), + ] diff --git a/lessons/migrations/0007_auto_20210205_1857.py b/lessons/migrations/0007_auto_20210205_1857.py new file mode 100644 index 0000000..7de23c4 --- /dev/null +++ b/lessons/migrations/0007_auto_20210205_1857.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.5 on 2021-02-05 15:57 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('lessons', '0006_auto_20210205_1848'), + ] + + operations = [ + migrations.AlterField( + model_name='task', + name='test', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lessons.tests'), + ), + ] diff --git a/lessons/migrations/0007_lesson_time_lesson.py b/lessons/migrations/0007_lesson_time_lesson.py deleted file mode 100644 index fd7f7d3..0000000 --- a/lessons/migrations/0007_lesson_time_lesson.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1.5 on 2021-01-30 11:27 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('lessons', '0006_auto_20210117_2008'), - ] - - operations = [ - migrations.AddField( - model_name='lesson', - name='time_lesson', - field=models.DateTimeField(auto_now=True), - ), - ] diff --git a/lessons/migrations/0003_auto_20210113_2224.py b/lessons/migrations/0008_auto_20210205_1858.py similarity index 57% rename from lessons/migrations/0003_auto_20210113_2224.py rename to lessons/migrations/0008_auto_20210205_1858.py index 489da99..f838a94 100644 --- a/lessons/migrations/0003_auto_20210113_2224.py +++ b/lessons/migrations/0008_auto_20210205_1858.py @@ -1,4 +1,4 @@ -# Generated by Django 3.1.5 on 2021-01-13 19:24 +# Generated by Django 3.1.5 on 2021-02-05 15:58 from django.db import migrations, models @@ -6,17 +6,17 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('lessons', '0002_auto_20210109_1220'), + ('lessons', '0007_auto_20210205_1857'), ] operations = [ migrations.RemoveField( model_name='task', - name='type', + name='test', ), migrations.AddField( model_name='task', - name='types', - field=models.ManyToManyField(to='lessons.Type'), + name='test', + field=models.ManyToManyField(to='lessons.Tests'), ), ] diff --git a/lessons/migrations/0008_materials_lesson.py b/lessons/migrations/0008_materials_lesson.py deleted file mode 100644 index d25cff8..0000000 --- a/lessons/migrations/0008_materials_lesson.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 3.1.5 on 2021-01-30 12:39 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('lessons', '0007_lesson_time_lesson'), - ] - - operations = [ - migrations.AddField( - model_name='materials', - name='lesson', - field=models.ForeignKey(default=3, on_delete=django.db.models.deletion.CASCADE, to='lessons.lesson'), - ), - ] diff --git a/lessons/migrations/0009_lesson_content.py b/lessons/migrations/0009_lesson_content.py deleted file mode 100644 index e953d8d..0000000 --- a/lessons/migrations/0009_lesson_content.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1.5 on 2021-01-30 17:08 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('lessons', '0008_materials_lesson'), - ] - - operations = [ - migrations.AddField( - model_name='lesson', - name='content', - field=models.TextField(default=''), - ), - ] diff --git a/lessons/migrations/0010_auto_20210203_0122.py b/lessons/migrations/0010_auto_20210203_0122.py deleted file mode 100644 index 19e1dc5..0000000 --- a/lessons/migrations/0010_auto_20210203_0122.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.1.5 on 2021-02-02 22:22 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('lessons', '0009_lesson_content'), - ] - - operations = [ - migrations.AddField( - model_name='materials', - name='Type', - field=models.CharField(default='link', max_length=100), - ), - migrations.AddField( - model_name='materials', - name='data', - field=models.TextField(blank=True), - ), - ] diff --git a/lessons/migrations/__pycache__/0001_initial.cpython-36.pyc b/lessons/migrations/__pycache__/0001_initial.cpython-36.pyc deleted file mode 100644 index caf0e16b0b9e3f2dc7a610e212ec0c4c886bbc3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1136 zcma)5OLNmO5VjQO{b);D`e23&r!dnbZ8>mYm}XMSFiEo zGKWpM!sLW`T_?D1R+EW#DI4w|qlqtS;A$sqaaV`f;RmWf}v9>f^+$ z-Hs+HM>LftftJI-ayT%j1iKz{Y%B*Au%V3ApazV-3RI!CurD~&39CZ`nhQo&i>wAV zgH})t+Cc}}&{=T8R|sE$Rai5-JR2S@c;<8cKYVU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)XgaanLB)D;nR))tdXb6!0Wbtt2*Y(?xf zO?LZ~ro80E!;vU0aNFw#AIl{7us99?XB&{eBn8X z4m+_Jm2UMZ9y6b2mWo>dieG&B{j*HsQ5=VqM47L6M6AM+zg-Q=r9pKGX;FuZ#WbU%XBPD zH;fg%F7FjHr&jfRUDm~&Q~6wOqy=eXm DKI+3rGn;Xb;0OI0X3={htb-7Zxvv{)Dvv{-kQg~8$ zdzsRhQutEYv-nf^Qv`Y$)0om(QUrUMQdzUuQiLWiV3ZE!OyL5Frw9X8A?p@_>J~*4 z7lVq6qnOGHGBuqkN+3ldm_bu=as-Q#tVw)gX-R&(k%5t+fuVr~kYQ+ii#@nBDJwO( zWb!l?*U6f!<-)>1$7?bb@d2q@Y-yRPIVr`H^Vou!{WJw9&t#9EEX3g^!j)f;T9jCl znV(m@lA%ZwsI*9P@*IwEML8gogNcQijfI7giAjW!k5PhAgc-q>m^_Ko(nJ}gfd#A! cmCyomZ*kb<=BJeAq}nk9dBq@Q0*oBY04Z2dVgLXD diff --git a/lessons/migrations/__pycache__/0002_auto_20210109_1220.cpython-36.pyc b/lessons/migrations/__pycache__/0002_auto_20210109_1220.cpython-36.pyc deleted file mode 100644 index 2918d86a33745c8cb7e30dca9b0613b9a997b50e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1932 zcma)7OK;mo5GGe7B~cGMw&O=1N#Cv7S}&(S3KT_DCk}$fNfE0TU5J%tEK#ONb(cyb zUDKDa)|jEa3l7^A|JJM#O2$9@z_ z<%}Z0KtAhf+2YwI;sO0-zzhS8jtNGG!4cf+vrY!Bp$#@T=nS)up5dug3BC=f4) z`Jp>>hJ|4ficq>_=d915e902r##-Da;YzO!vT%#2GTGdM?F5-wB6rpzZW!Vd;zu}{CGt<7?*@Y&}=vOL#x)@GXibS7>zMPNhUcFww=kZA# zdChvWQE$}m6VW(Q*#M=~!(1edhUbTV?DIf5PZPFcKD191d-AYisbT`}3FI+?DvX6c z;$rGu;8f)$3WE7FRK=Glx{*XLM)GcZj{X7jP+qsK*1kSotXQ z=r&=Dip3Ezti*tG?qdLwQX{Y0hg4SJhZjQMvn!y5RPAoS!wb5b{1y2M`|&_oZ7wgA z6Av&FQP|k{rShXEe*-BMV#!}?~ zIZzN}ZJt?qp`Gr^(ne?{^;u~l(UUPBbEE{#nTj& zKOS%~C)@ZcPRZgE%C3)d!Nw^Mr|n3uskrozW~c3sFg@m404bII;l=azqvN(Jeiuan z@-St)(HQ6N_&*GBqU)fSf1cL{(FkjP;PV>3>|=Py$KykRL3(P9$F+G~Yu8_i8r`er z%FX-QYc!kn>Ub*j7fF{{4rs|`nCV!S$=Hs0CzI~3xx1uXb8}Ab%=fZ+O}Qz?Wad62 z>|!TdWpn?AJ=aXURveX2YhHzJ(yX*U2TNu({kT;Z-4ORF#sqs^k(7E&0+stF9gA;u Mo25={)68Z51rDkr3jhEB diff --git a/lessons/migrations/__pycache__/0002_auto_20210109_1220.cpython-37.pyc b/lessons/migrations/__pycache__/0002_auto_20210109_1220.cpython-37.pyc deleted file mode 100644 index 44cfe0d3579007c8c0fb5f203fbbcf99d49a7169..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1920 zcma)7OK;mo5GGe7B~dTOcKqlgeLvLJs^s>N7DW+9j)S0aTExml5J0RrV~H|Fs$9yA zbSv7cuRXWN{-wS4@i4qK!4Go0W{EkZLD|oG3zp2t(l+e8jm%|f$_5j2I?d8r(D+rcB0kIOTuV%Chf5| zh1RP63KzyH zgCgk)SRC0SYg8JQ!G_WWJ0%p9FIa-Bti)B(`nB?#MjmS9p-Mj2;7)?fT_M+3A~y(G zOOTsa(p{3)lx|>Lp|@6|RkRvx!_I}i#B%pPt*eWV#lwB(@- zAEzuxE15mnbdDr@a#%NHIdR}d$YTUq znnd21M>FRPXR;_TBA7QvSw6?89}08=K1NxJXA^YN81vmltcIBON9e|`&xP2e8n3prI$`6^WrzR+3 zAq#*Uhy;0CoUEEzr?WJa6B@~UUd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0AnxO65kdf?t%Pu^OO-_s(YV+}*M~VYbX1|WJn<|^lGGHdWoyzT zohH-drJ1H_;=E;H9|$)c4kB5YX^I-1H=xfI`|W7oXmZCFrBlmxtow+h_UxDQzs#|M z8=4=Q;df(PYz*zWs*w1RF<)0j#Vz>+*kJ?M%;so&vRSw%pRjJ%_@3Li@GZc=dd;<` z*G03rYZ-U-xb1N7Sjx9?u%pDp$_pI2*J<+v`fIWM}78Gq03i`hfI-z9&1 zk(}(g_}`xCg-O%&`J~(Q{OSRvJs}8n;CWKXKrt#gRBy(fi(pYSWjlfUVV^|u*Rjp6TajMj znty;JzqD6Q`~u>@tesGawRU!PcKr6un|;&ic#KB()uW3)oUxyJvl|vUCp2ZB3@|WK zwlaKU#eHt*Jx@*FddI*7>nj5bjim9#^c%pZtk?KO|F9lc-YSknSjKrKmA%RVQ+dAB zXS?B&b3#*IkU{1fz;>Ey2?G<5h8ZY6s06;{)53_Fbu-$G7pA>;o)F7 zI1UbvhR>BV3+2^pU7+GI%qEJzKkZqnU1cr>h9!b(6(U}RVjW!JTDcNM9H#Lts`d?v zMJ_SO!WAk@+a4Dks#DpQF{U7uRT8|i^aZ!wEt$TKl@uX@Zk`3C8J2W^nfFZ6Q)^fu z)<}&C>6|Kaf+`#Y$_oNYyH1h(b`X5J4pV)(-T@Yv0cOh>rJ#;8)f!i2oM~KP>WDic z9VVKfa%cFttX*%EmMFIVBo`P**#|1vh9u0QTya<^r{YS@R?YEfIv$GuwSf& zezHxP@*Ww-v@Ofv{JzmOX{E0^@7c<&DfeMfNl;h)@L#ZBztjG%81Y!M*4TIaYwsz= Sl=HF{`?VHN>a?!mn12D30QBVm literal 0 HcmV?d00001 diff --git a/lessons/migrations/__pycache__/0004_answer_completed.cpython-37.pyc b/lessons/migrations/__pycache__/0004_answer_completed.cpython-37.pyc deleted file mode 100644 index 99d4fc07f0a1df969c04ae8fa320facbd76aee60..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 579 zcmYLG%}T>S5Z=wEX<8Hn1>ZmjsHD-8i1-6~vLNCm1eUckmekFU*;etaSMR=pue4WB zzJeE>O|e)zv;DdARwJ@0_tuXDr1ha7@Q+kpc!>vx29*@KTSn3kDvD zR|W$4M7)SpfPc-R&KKpf$g}+-A2({6SEaE*Q2}Z*a-pRJ1di#LZBocm4lMP6k9jK4 zpLASt3?^Ohq4UNecoP%}p-U}7+q+!Wrbbs0Tqa01+5g{9%0GzuTjd145X;o=dW$Uv2s>a1`K3KC(39b6RIy=a2 z3^pdq^`p@lK8~^6QFZN*`|sSU(S5ccoc(V&BkKEdPE-D|+^wG*_l9oO#yxW=0^jEz peXV~O`L+iWRgSA&xNYZdr)`7(W6jY9-M8W4d;>?0lyOAY#4oxsn+^Z~ diff --git a/lessons/migrations/__pycache__/0004_auto_20210205_1543.cpython-37.pyc b/lessons/migrations/__pycache__/0004_auto_20210205_1543.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..87ae46f35d75e4b55c3f10e1acb2ac955726e7b2 GIT binary patch literal 597 zcmZWmJ5L-j5VqI8y}cDk=}1Ex=?YGJ2Q(;&NRUDm8bCs;l^k<3EPHq#toKl;NlQzg zGJnZ!D*i$$#(SJ7GS-ae<@sjDUpF^nMs)FM`^Rt2*k5m~Ns@9%Y(J0y2Hdccr@Rc( zfU{!;0f=7=1oDM=5UBup%Ep6d%4Org#buGVx-06+y0EMPjh*|@nueqt659z0WGM%h z2EcQk3Y3e1FOK122oeSmJ_ay+6cmdfB9M_AeP356sG&h?JQm!*naa>THzg|qiemgU0gT# zx~o5|-J)nO{+%8jWak!Jn-%8Hnhfu9tafzMc+KBCmwJAay^f!~Z9Jnz?ESxp-AQxb z`dUmwn@XvwiTbv6c3o-n;1IY6YMDOx92OPP_oO C+Mcff literal 0 HcmV?d00001 diff --git a/lessons/migrations/__pycache__/0005_auto_20210117_1752.cpython-37.pyc b/lessons/migrations/__pycache__/0005_auto_20210117_1752.cpython-37.pyc deleted file mode 100644 index 5c051e75f77882d22043b394ec6fdbfe1c6908f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 626 zcmY)r%WBm?bS9ZRX+;DTe?W-Pl6$cfM5IH7|S= zo4_T&;7qL$UrjV(?H zHe56|Fx8+@b7~^vHUhj<+jh!)>fiM&d)1*8GYu{qY{802nJb%g>YJQn&$7hEa(0x` zrczSiwngIir2Mi~tqXP%;D|k7Uo~hn?V8#6HNab!RQpccd*4r3qn=eZ9Y(xe;4h{h zk;6>>p1*lfeln;{*|gWDE%Ca>{y>eRje$)Bpeg diff --git a/lessons/migrations/__pycache__/0005_auto_20210205_1544.cpython-37.pyc b/lessons/migrations/__pycache__/0005_auto_20210205_1544.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d41a24f1c83fcc35d50c42287b07473736727e2e GIT binary patch literal 680 zcmZWn&5qMB5VjrXr(r9t!~yoe1LUw#wzM1&pzRix17a_QOBBhZ^-v|7KjL(y?iH^4 zAUpss<0}_<1x}2UmOU_$C*#lKnQvx%F&_H_<;Tk>pMFt7ewxieI2z};RESCvNefca zn3gPN)a+Sd#r!RimgL`vgrt^`tr4m9iP zz``;Nby1}yXx?l4a|VUH3dY(KJuZayg+RY;0caly@nxG9#@Fm5G*C&X))}alVX4}m z7ag>hCQ57dz-8S+wyEC1PCGJBt4*z$TxqXof*sWEV!m9=U%%0Q-N3%9-%0xzZ};lY za`8O*sGwCzR@|r}ftw9fr)kp|%luDQ>H0d^SDf6>Cc#e4{_oT@Y<8`A2WCpjJQdG! zIHwH19uFKn8mNYH)z>xDa`F!hhoOguBHD+Bt%-Thd$3Lr)831rgRe|WlyN(zp7j^6 C>bkH1 literal 0 HcmV?d00001 diff --git a/lessons/migrations/__pycache__/0006_auto_20210117_2008.cpython-37.pyc b/lessons/migrations/__pycache__/0006_auto_20210117_2008.cpython-37.pyc deleted file mode 100644 index 248be89712e5e1a0b403c0c856757858f90a6eea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 610 zcmZ8eOHUjz49;sFyDbQzR{Vk@%>gvK5>TP4;vuysxKJ*mk7?kCr#4>T`U)^o~F}D zI++~l$(oZYwmS5-J{*0)`^6BuaogeZz<#m*4WWbi zb9H{4Ut8>LUYR> yGO-Mm;)2$uSnUITnJ71cdC`>ZKHLoSdrx`*UkI+ew*}ePmJ&BKJ4OkcgSEDppGOt&SVRB)D0SS)J_;266xqNYYX~L$3%}BqKZWp5m_UGdCN%met zr?Wy`Yn8$E3hKSQZLMVgdy9N|m2KM1?iQ2bm=6CR)6x7WZf`pK2<(cqeJ6qAaZVY2 zgFW)hWP}>a#n9K-%kDp8JZ?PRHqkw>Xl>3r+@tgeZ6-J#C-~HkL|eD}G;sa`FR;3< literal 0 HcmV?d00001 diff --git a/lessons/migrations/__pycache__/0007_auto_20210205_1857.cpython-37.pyc b/lessons/migrations/__pycache__/0007_auto_20210205_1857.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c367c8006f538186a1bd7b6495e7a16ea1338427 GIT binary patch literal 677 zcmZWnJ8#rL5Z;GhXL1q}1*G5yxQOMP$U_LB90#F5q&d-8mKNXbVA&*Y?6al`4Ci-%B#ZafpnyM$E0`1(dR(=SS>J<_xmzf(^sH1 z7EB)}NpdRkZQqDlGCNLY$%!~Ve|B!1KG)aCLHA##JMY+P8p9_|Ef6R4U|8Qo9DA_1 zMV)WJI0JV-m7wHRG&O-3>_V7O2=v=3K>0w3&)ZyCU#m%Ip_WjuOVAy|K211RJ#?2g zOUDPpWz#`f)bHTdc(TgtqA^UaOfVq9@fm+HUoPga-t6qe+ty0~beTATA8_b45r%>*yT3BI%=(bnxD4ftRCP`Ty+ literal 0 HcmV?d00001 diff --git a/lessons/migrations/__pycache__/0007_lesson_time_lesson.cpython-37.pyc b/lessons/migrations/__pycache__/0007_lesson_time_lesson.cpython-37.pyc deleted file mode 100644 index 601256618dca393ccc55613d30b40915faa2b11c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 585 zcmYjO%}T>S5Z=wEX<97^D!zdbP)R+gh=_ma$zH0L5LjbpEUEc3+bW**>J#_`9(&TCVnW`;^pmuM{v!yTDS#--d2x4U7tyGtP4 z)7~^gFO1V1<SfBX>ZgCYA73l1 zRh(vzDvR-Ph{a}7RR)>==4~>#k7uOgzb(f^e|N@C{$sjTJ=f+X&BB#=Y+rb;%N_cx nzZbZ=1*4=GmRoRZN4Epp;NM_Vv_ki_e=uFbq2Z+r*Cp`_*-4!h diff --git a/lessons/migrations/__pycache__/0008_auto_20210205_1858.cpython-37.pyc b/lessons/migrations/__pycache__/0008_auto_20210205_1858.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16f57ced6e37cb4b61cf3557f1e0c124c2ebd781 GIT binary patch literal 629 zcmZWmO>fgc5Z$jhwjrVi5GTY9$%jU6q^ePcPzw^A+5;^Y%hKXz2Fr=R@H&y&D_rwK z_)B}`#9!dVtdpn*Mw;ihn)S?^x9=yDkWsu|z52=oW53Zp72T} zg0oKy1jwHZB=V*FArlGehDD=4beBcKhE67D|3+q;M2Ik23LnUG;~~|F*GrG8OQON&enaS zXYuSLp2es7WPW;PRiBv^A)0;=>4fPztI#Tk50ia|=`Gzb5x1gmBH8&QvI_|8=v#p$ zTt}hx_3)$CHq@FnT$f1vsn*}uS?QX&6JU!qV7(~NbYw8IPd;PSZ1AINWBp5jfpyZ= zo?T`2{cYoLR}Y&O_b&co-E*hH!QYz?=jj)Nok@#wW6BgaIo8Kn+dAgH$9LIcmF|~G zAKxM+W9I)GGoQBioqKPO(i{=^(o>2H?g@v257p~P*#MSVoi|gs8}=E555-4$JNAOQ RSpV(LnRjkK;|w^G{{W0dqLu&v literal 0 HcmV?d00001 diff --git a/lessons/migrations/__pycache__/0008_materials_lesson.cpython-37.pyc b/lessons/migrations/__pycache__/0008_materials_lesson.cpython-37.pyc deleted file mode 100644 index 71990825db9bc9c099d5333408cc72f6be6f57e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 697 zcmYLH&2H2%5Vqs|(?uLWsJuZAjrK-`5bCl}4v0!<#U+YlvOCi#!AX`lTd7>zYafJH z@|9CxfCDGS$!_b&{kIGMw( z?I@ACpBM;mZyC7AYwt#69ylwOc=vRNC60-ks_cuQ>RN65rUO*^Vq;^66_RpBTc46Z zmT_R21H9y!K)0r9AkeP^svp)-?bmVr1U&HX1O#`2vW_66evyg392!yAK%v&uGJ83n z&tJ>Ql0((tUeBVY7_hGjMX;vuy&wR;p6+j^)0qep0A3b5HJGStCE>>bjWcu}Phx;=`2Uzcz4ZyI}@ zSL#Zu9Ir}jPm1ljXe(e15cjZLgseGVmPh7ga?(M?}Xlwg+LgBkEcjz1a xiEp9_XbS6brfHJn2WL9Hg7h##|J-7=H6Kw=+AH#z@a@FjJ4=YRY0r2l{sZh$#SZ`g diff --git a/lessons/migrations/__pycache__/0009_lesson_content.cpython-37.pyc b/lessons/migrations/__pycache__/0009_lesson_content.cpython-37.pyc deleted file mode 100644 index c6cb4a28cbd3bc0cdad533d30458b04958299c88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 571 zcmYLGy-ve05VqqqNh^>T=qn&a0@M)@Li|WD0Ryl^k&NjbRf_XNoK`Ty3IlHekK~n! zS773trs5)>zx&DEedpuV)d3^<`WW86bH=`%u@s-cAsw?p3K($Ba-Q(qOFYib7v>XSmFVn@I;_L z?YZI@OhfRY_r@W36BLOcq!y9wpD$}uqfnzU)Fl~?Mxz~>s|M>#X(JbY8+3O#E{g_> z#Mtaw4<8-?=~gUyB$^8G2E`6Yxj0;#l}5vBm&>(9(}F8S%5Z?9Aoox~+f(q!7TqN=x6%j&#AgD-_qp>V4dp8ruck8wB`l6(U_8x#o z;BBb4rOGQ%F>B|Pv37R8`JY*TI6O=k(XT(xznyxF{dHhZ0SRYx%qwERfGbw>oY!9N zarT*k2mVh6KJvBy!_R#PE?FAhlP^m>o77d=$-Zi|v6H$1RA%K&dzzAPM#p?4hAij6 zau0aPb033s=#t}PJ%s>5nCv{5?)LhK^by36?6}jGULL~}Dt%z%FZ-I*z*M0zuKKeq z%if3)iB+R})V+;s*<)8pWo)pxYtaU((wlprW?U@bmE5YHrjWN3s>}X5^$EE-gqAh= z4?Mi8P=O6V_HvPO8!na9n~OBDkr@1hu!#^9w^c~;fe_!fQn^@%09(|6dR3w6X#LDa z?*Tr!oSpAre10vv0o!r3AybXG0*0+Y@WRq*=#;PY41As7fk4wr^F(E5(M0%@5meP o!G4hjHios-Wpe_{VUnT$!T8wVD7~aSHhMemkuK)l5 diff --git a/lessons/migrations/__pycache__/__init__.cpython-36.pyc b/lessons/migrations/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index 62c0defe4aa72ece2c1b0e44ab076b6d3d4b7a3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmXr!<>k7t_eVSf5IhDEFu(|8H~?`m3y?@*2xib^^jpbL1QJFNzZ~>4@^e%5GjlQ% z^;65zQ}c8a3kr0LQga|Y$ASX=oYdmt{JdiQ+|2Z%#F9)9Gd?~uFS8^*Uaz3?7Kcr4 QeoARhsvXGWVjyM!08a%a-2eap diff --git a/lessons/migrations/__pycache__/__init__.cpython-37.pyc b/lessons/migrations/__pycache__/__init__.cpython-37.pyc index 8a590675fcbd03e56a740a5c08aed67ce74273b9..f976b03f4b9ef58a066266a9701335a45ce1338b 100644 GIT binary patch delta 20 acmbQuIGd5jiIbIy9KEL diff --git a/lessons/models.py b/lessons/models.py index 0c255df..aa6f0aa 100644 --- a/lessons/models.py +++ b/lessons/models.py @@ -44,16 +44,28 @@ class Tests(models.Model): class Type(models.Model): name = models.TextField(max_length=150) + +class TaskType(models.Model): + name = models.TextField() + class Task(models.Model): theory = models.TextField() practise = models.TextField() - test = models.ForeignKey(Tests, on_delete=models.CASCADE) + test = models.ManyToManyField(Tests) types = models.ManyToManyField(Type) number = models.IntegerField() max_score = models.IntegerField(default=0) + is_timing = models.BooleanField(default=False) + time = models.IntegerField(default=30) + Type = models.ForeignKey(TaskType, on_delete=models.CASCADE) + is_autoCheck = models.BooleanField(default=False) + autoCheckData = models.TextField(blank=True) + + + class Theme(models.Model): tasks = models.ManyToManyField(Task) name = models.CharField(max_length=150) @@ -78,8 +90,8 @@ def _post_save_receiver_(sender, instance, created, **kwargs): for child in instance.lesson.type_lesson.group.child_set.all(): AnswerSheet.objects.create(child=child, completed=False, test=instance) -@receiver(post_save, sender=Task) +'''@receiver(post_save, sender=Task) def _post_save_receiver(sender, instance, created, **kwargs): if created: for child in instance.test.lesson.type_lesson.group.child_set.all(): - Answer.objects.create(number=instance.number, sheet=child.answersheet_set.all().filter(test=instance.test)[0], content="") \ No newline at end of file + Answer.objects.create(number=instance.number, sheet=child.answersheet_set.all().filter(test=instance.test)[0], content="")''' \ No newline at end of file diff --git a/lessons/schema.py b/lessons/schema.py index 60692ab..20186b3 100644 --- a/lessons/schema.py +++ b/lessons/schema.py @@ -38,7 +38,7 @@ class UpdateLessonRegistration(graphene.Mutation): ok = graphene.Boolean() def mutate(self, info, id, descr=None, name=None): - lesson = Lesson.objects.get(id=id) or None + lesson = Lesson.objects.get(id=from_global_id(id)[1]) or None if lesson == None: return UpdateLessonRegistration(ok=False) descr_upd = lesson.descr name_upd = lesson.name @@ -71,7 +71,7 @@ class CreateTest(graphene.Mutation): test = graphene.Field(TestsType) def mutate(self, info, lesson_id, name, deadline=None): - lesson = Lesson.objects.get(id=lesson_id) + lesson = Lesson.objects.get(id=from_global_id(lesson_id)[1]) t = Tests.objects.create(name=name, lesson=lesson, deadline=datetime.datetime.now()) return CreateTest(test=t) @@ -129,17 +129,23 @@ class createTask(graphene.Mutation): practise = graphene.String() number = graphene.Int() max_score = graphene.Int() + Type = graphene.String() task = graphene.Field(TaskType) - def mutate(self, info, test_id, theory, practise, number, max_score): + def mutate(self, info, test_id, theory, practise, number, max_score, Type): + task = Tests.objects.get(id=from_global_id(test_id)[1]) + print(task) m = createModel(model=Task, fields = { - "test": Tests.objects.get(id=test_id), "theory": theory, "practise": practise, "number": number, - "max_score": max_score + "max_score": max_score, + "Type" : taskType(id=from_global_id(Type)[1]) }) + print(m) + m.test.set([task]) + m.save() return createTask(task=m) class updateTask(graphene.Mutation): @@ -149,15 +155,26 @@ class updateTask(graphene.Mutation): practise = graphene.String() number = graphene.Int() max_score = graphene.Int() + Type = graphene.ID() + autoCheck = graphene.Boolean() + autoCheckData = graphene.String() + is_time = graphene.Boolean() + time = graphene.Int() task = graphene.Field(TaskType) - def mutate(self, info, task_id, theory=None, practise=None, number=None, max_score=None): - task = Task.objects.get(id=task_id) + def mutate(self, info, task_id, theory=None, practise=None, number=None, max_score=None, + Type=None, autoCheck=None, autoCheckData=None, is_time=None, time=None): + task = Task.objects.get(id=from_global_id(task_id)[1]) m = updateModel(Task, task, { "theory": [theory, task.theory], "practise": [practise, task.practise], "number": [number, task.number], - "max_score": [max_score, task.max_score] + "max_score": [max_score, task.max_score], + "Type": [taskType(from_global_id(Type)), task.Type], + "is_autoCheck": [autoCheck, task.is_autoCheck], + "autoCheckData": [autoCheckData, task.autoCheckData], + "is_timing": [is_time, task.is_timing], + "time" : [time, task.time] }) return updateTask(task=m) @@ -328,18 +345,52 @@ class CreateMaterial(graphene.Mutation): lesson_id = graphene.ID() data = graphene.String() name = graphene.String() + lessonType = graphene.String() material = graphene.Field(Material) - def mutate(self, info, lesson_id, data, name): + def mutate(self, info, lesson_id, data, name, lessonType): lessonId = from_global_id(lesson_id)[1] print(lessonId) lesson = Lesson.objects.get(id=lessonId) - material = Materials.objects.create(lesson=lesson, data=data, link="google.com", name=name) + material = Materials.objects.create(lesson=lesson, data=data, link="google.com", name=name, Type=lessonType) return CreateMaterial(material=material) +class DeleteMaterial(graphene.Mutation): + class Arguments: + material_id = graphene.ID() + + ok = graphene.Boolean() + + + def mutate(self, info, material_id): + material_id = from_global_id(material_id)[1] + + Materials.objects.get(id=material_id).delete() + return DeleteMaterial(ok=True) + + +class ChangeMaterail(graphene.Mutation): + class Arguments: + material_id = graphene.ID() + data = graphene.String() + name = graphene.String() + + material = graphene.Field(Material) + + + def mutate(self, info, material_id, data, name): + material_id = from_global_id(material_id)[1] + material = Materials.objects.get(id=material_id) + material.name = name or material.name + material.data = data or material.data + material.save() + return ChangeMaterail(material=material) + + + class Mutation(graphene.ObjectType): create_lesson = CreateLesson.Field() update_lesson_registration = UpdateLessonRegistration.Field() @@ -371,6 +422,8 @@ class Mutation(graphene.ObjectType): create_material = CreateMaterial.Field() + deleteMaterial = DeleteMaterial.Field() + changeMaterial = ChangeMaterail.Field() class Query(graphene.ObjectType): @@ -380,8 +433,7 @@ class Query(graphene.ObjectType): all_subject = DjangoFilterConnectionField(SubjectType) subject = relay.Node.Field(SubjectType) - task = relay.Node.Field(TaskType) - all_task = DjangoFilterConnectionField(TaskType) + answer_sheet = relay.Node.Field(AnswerSheetType) all_answer_sheet = DjangoFilterConnectionField(AnswerSheetType) @@ -395,4 +447,16 @@ class Query(graphene.ObjectType): subject_class = relay.Node.Field(LocalSubjectType) subject_classes = DjangoFilterConnectionField(LocalSubjectType) + + materials = DjangoFilterConnectionField(Material) + material = relay.Node.Field(Material) + + gettaskType = relay.Node.Field(TaskTypeType) + taskTypes = DjangoFilterConnectionField(TaskTypeType) + + + tasks = DjangoFilterConnectionField(TaskType) + task = relay.Node.Field(TaskType) + + schema = graphene.Schema(query=Query) \ No newline at end of file