Skip to content

Commit 3eaf8aa

Browse files
authored
fix: ensure platform name is string (#368)
1 parent 47a1f40 commit 3eaf8aa

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

CHANGELOG.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ Please See the `releases tab <https://github.com/openedx/xblock-lti-consumer/rel
1616
Unreleased
1717
~~~~~~~~~~
1818

19-
921.0 - 2023-05-02
19+
9.2.1 - 2023-05-02
20+
------------------
21+
* Bug fix for adding platform name as an LTI parameter
22+
23+
9.2.0 - 2023-05-02
2024
------------------
2125
* Add platform name as an LTI parameter to LTI 1.1 launches as the "tool_consumer_info_product_family_code" parameter.
2226
* Add platform name as an LTI parameter to LTI 1.3 launches as the "platform instance" claim.

lti_consumer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from .apps import LTIConsumerApp
55
from .lti_xblock import LtiConsumerXBlock
66

7-
__version__ = '9.2.0'
7+
__version__ = '9.2.1'

lti_consumer/lti_1p1/consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def generate_launch_request(self, resource_link_id):
283283
# Parameters required for grading:
284284
'resource_link_id': resource_link_id,
285285

286-
'tool_consumer_info_product_family_code': settings.PLATFORM_NAME,
286+
'tool_consumer_info_product_family_code': str(settings.PLATFORM_NAME),
287287
}
288288

289289
# Check if user data is set, then append it to lti message

lti_consumer/lti_1p3/consumer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ def get_lti_launch_message(
355355
# Platform instance claim
356356
# The GUID must be consistent across platform deployments, so we have opted to generate a UUID
357357
# based on a namespace identifier and the platform name itself.
358-
guid = uuid.uuid5(uuid.NAMESPACE_DNS, settings.PLATFORM_NAME)
359-
platform_instance_claim = {'guid': str(guid), 'name': settings.PLATFORM_NAME}
358+
guid = uuid.uuid5(uuid.NAMESPACE_DNS, str(settings.PLATFORM_NAME))
359+
platform_instance_claim = {'guid': str(guid), 'name': str(settings.PLATFORM_NAME)}
360360
platform_instance_claim = {
361361
"https://purl.imsglobal.org/spec/lti/claim/tool_platform": platform_instance_claim
362362
}

0 commit comments

Comments
 (0)