From fdc6e3c1a1cd3f6ac5c580597b3826f69c455d52 Mon Sep 17 00:00:00 2001 From: SaadYousaf <saadyousaf@A006-00314.local> Date: Mon, 8 Feb 2021 19:03:48 +0500 Subject: [PATCH] [TNL-7520] - Handle case when modal height and width and set to empty in LTI component in studio. --- lti_consumer/lti_xblock.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lti_consumer/lti_xblock.py b/lti_consumer/lti_xblock.py index d41d1d5..e859562 100644 --- a/lti_consumer/lti_xblock.py +++ b/lti_consumer/lti_xblock.py @@ -1427,6 +1427,8 @@ class LtiConsumerXBlock(StudioEditableXBlockMixin, XBlock): Returns: float: The css position offset to apply to the modal window """ + if not viewport_percentage: + viewport_percentage = 80 # set to default value in case viewport_percentage is None return (100 - viewport_percentage) / 2 def get_outcome_service_url(self, service_name="grade_handler"): -- GitLab