From 72ed26a77109687e5a39cfa19e15ab686eb32026 Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Thu, 29 Aug 2024 12:51:18 +0200 Subject: [PATCH] Model changes for assignment.lti_v13_resource_link_id --- lms/models/assignment.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lms/models/assignment.py b/lms/models/assignment.py index 3e4917ac5a..74835b1759 100644 --- a/lms/models/assignment.py +++ b/lms/models/assignment.py @@ -28,9 +28,19 @@ class Assignment(CreatedUpdatedMixin, Base): id: Mapped[int] = mapped_column(autoincrement=True, primary_key=True) - resource_link_id = sa.Column(sa.Unicode, nullable=False) + resource_link_id: Mapped[str] = mapped_column(sa.Unicode) """The resource_link_id launch param of the assignment.""" + lti_v13_resource_link_id: Mapped[str | None] = mapped_column(sa.Unicode) + """ + The LTI1.3 resource_link_id of the assignment. + + This will be often the same as value as resource_link_id but it might be different in: + - LTI1.1 launches. Where this will be null. + - Upgraded instances from LTI1.1 where we prefer the LTI1.1 value (if exposed by the LMS). + In those cases resource_link_id will be the 1.1 value and we'll store here the 1.3 version. + """ + tool_consumer_instance_guid = sa.Column(sa.Unicode, nullable=False) """ The tool_consumer_instance_guid launch param of the LMS.