-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate fields/functionality from Quiz to Assignment (#32)
Also rename LogMessage to QuizLogMessage
- Loading branch information
1 parent
3725a59
commit 9c7f97f
Showing
7 changed files
with
149 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
tin/apps/assignments/migrations/0030_quizlogmessage_assignment_is_quiz_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Generated by Django 4.2.13 on 2024-05-27 04:12 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("assignments", "0029_assignment_markdown"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="QuizLogMessage", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, primary_key=True, serialize=False, verbose_name="ID" | ||
), | ||
), | ||
("date", models.DateTimeField(auto_now_add=True)), | ||
("content", models.CharField(max_length=100)), | ||
("severity", models.IntegerField()), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name="assignment", | ||
name="is_quiz", | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.AddField( | ||
model_name="assignment", | ||
name="quiz_action", | ||
field=models.CharField( | ||
choices=[("0", "Log only"), ("1", "Color Change"), ("2", "Lock")], | ||
default="2", | ||
max_length=1, | ||
), | ||
), | ||
migrations.DeleteModel( | ||
name="LogMessage", | ||
), | ||
migrations.AddField( | ||
model_name="quizlogmessage", | ||
name="assignment", | ||
field=models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="log_messages", | ||
to="assignments.assignment", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="quizlogmessage", | ||
name="student", | ||
field=models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="log_messages", | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.