Skip to content

Commit

Permalink
feat: added ltipiitool model (openedx#32790)
Browse files Browse the repository at this point in the history
* feat: added ltipiitool model

* feat: added ltipiitool model

* feat: created ltipiitool model

* chore: squashed ltipiitool mirgation files for agreements app.

* chore: fixed migration files
  • Loading branch information
ericanwoga authored Aug 1, 2023
1 parent b97007e commit 0bde216
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
23 changes: 23 additions & 0 deletions openedx/core/djangoapps/agreements/migrations/0002_ltipiitool.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.20 on 2023-08-01 14:06

from django.db import migrations, models
import opaque_keys.edx.django.models


class Migration(migrations.Migration):

dependencies = [
('agreements', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='LTIPIITool',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('course_key', opaque_keys.edx.django.models.CourseKeyField(db_index=True, max_length=255, unique=True)),
('lti_tools', models.JSONField()),
('lti_tools_hash', models.IntegerField()),
],
),
]
12 changes: 12 additions & 0 deletions openedx/core/djangoapps/agreements/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,15 @@ class IntegritySignature(TimeStampedModel):
class Meta:
app_label = 'agreements'
unique_together = ('user', 'course_key')


class LTIPIITool(models.Model):
"""
This model stores the relationship between a course and the LTI tools in the course that share PII.
"""
course_key = CourseKeyField(max_length=255, unique=True, db_index=True)
lti_tools = models.JSONField()
lti_tools_hash = models.IntegerField()

class Meta:
app_label = 'agreements'

0 comments on commit 0bde216

Please sign in to comment.