-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Turnitin API workflow test with openedx XBlock (#4)
- Loading branch information
1 parent
ae01187
commit db58663
Showing
26 changed files
with
1,915 additions
and
13 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
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,47 @@ | ||
# Generated by Django 3.2.21 on 2023-10-04 20:37 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="TurnitinSubmission", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"turnitin_submission_id", | ||
models.CharField(blank=True, max_length=255, null=True), | ||
), | ||
( | ||
"turnitin_submission_pdf_id", | ||
models.CharField(blank=True, max_length=255, null=True), | ||
), | ||
("created_at", models.DateTimeField(auto_now_add=True)), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="submissions", | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
], | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
platform_plugin_turnitin/migrations/0002_alter_turnitinsubmission_user.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,24 @@ | ||
# Generated by Django 3.2.20 on 2023-10-06 19:16 | ||
|
||
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), | ||
("platform_plugin_turnitin", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="turnitinsubmission", | ||
name="user", | ||
field=models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="turnitin_submissions", | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
] |
Empty file.
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 |
---|---|---|
@@ -1,3 +1,29 @@ | ||
""" | ||
Database models for platform_plugin_turnitin. | ||
""" | ||
|
||
from django.contrib.auth import get_user_model | ||
from django.db import models | ||
|
||
User = get_user_model() | ||
|
||
|
||
class TurnitinSubmission(models.Model): | ||
""" | ||
Represents a submission to Turnitin. | ||
Attributes: | ||
- user (User): The user who made the submission. | ||
- turnitin_submission_id (str): The unique identifier for the submission in Turnitin. | ||
- turnitin_submission_pdf_id (str): The unique identifier for the PDF version of the submission in Turnitin. | ||
- created_at (datetime): The date and time when the submission was created. | ||
.. no_pii: | ||
""" | ||
|
||
user = models.ForeignKey( | ||
User, on_delete=models.CASCADE, related_name="turnitin_submissions" | ||
) | ||
turnitin_submission_id = models.CharField(max_length=255, blank=True, null=True) | ||
turnitin_submission_pdf_id = models.CharField(max_length=255, blank=True, null=True) | ||
created_at = models.DateTimeField(auto_now_add=True) |
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.