From a0da188671c6be1915798f9640f2f4320c9f0c84 Mon Sep 17 00:00:00 2001 From: mike seibel Date: Thu, 27 Aug 2020 11:41:32 -0700 Subject: [PATCH] scope issue --- blti/views/develop.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/blti/views/develop.py b/blti/views/develop.py index 30d4cbe..788f360 100644 --- a/blti/views/develop.py +++ b/blti/views/develop.py @@ -11,6 +11,9 @@ class BLTIDevBase(TemplateView): def lti_app(self): try: + if len(settings.LTI_DEVELOP_APP) <= 0: + raise BLTIException("Empty setting: LTI_DEVELOP_APP") + return settings.LTI_DEVELOP_APP except AttributeError: raise BLTIException("Missing setting: LTI_DEVELOP_APP") @@ -95,8 +98,6 @@ class BLTIDevLaunch(BLTIDevBase): ("lti_version", "LTI-1p0"), ("oauth_callback", "about:blank"), ("resource_link_id", "E9a206DC909a330e9F8eF183b7BB4B9718aBB62d"), - ("resource_link_title", - "UW LTI Development ({})".format(self.lti_app())), ("tool_consumer_info_product_family_code", "canvas"), ("tool_consumer_instance_name", "University of Washington"), ("user_id", "e1ec31bd10a32f61dd65975ce4eb98e9f106bd7d"), @@ -115,6 +116,8 @@ def get_context_data(self, **kwargs): 'uwcourse:{}:arts-&-sciences:psych:psych'.format(campus)), ("oauth_timestamp", generate_timestamp()), ("oauth_nonce", generate_nonce()), + ("resource_link_title", + "UW LTI Development ({})".format(self.lti_app())), ] lti_parameters += self._static_lti_parameters