From 1106f6aca551a74b5b97d62e5996a06ab3ab52a2 Mon Sep 17 00:00:00 2001 From: Dillon Dumesnil <ddumesnil@edx.org> Date: Wed, 27 May 2020 06:41:15 -0700 Subject: [PATCH] AA-167: Making icon_class dynamic for LTI --- lti_consumer/lti_consumer.py | 7 ++++++- setup.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lti_consumer/lti_consumer.py b/lti_consumer/lti_consumer.py index 943ada3..9a1d910 100644 --- a/lti_consumer/lti_consumer.py +++ b/lti_consumer/lti_consumer.py @@ -250,7 +250,6 @@ class LtiConsumerXBlock(StudioEditableXBlockMixin, XBlock): """ block_settings_key = 'lti_consumer' - icon_class = 'problem' display_name = String( display_name=_("Display Name"), @@ -594,6 +593,12 @@ class LtiConsumerXBlock(StudioEditableXBlockMixin, XBlock): raise LtiError(self.ugettext("Could not get user id for current request")) return six.text_type(six.moves.urllib.parse.quote(user_id)) + def get_icon_class(self): + """ Returns the icon class """ + if self.graded and self.has_score: # pylint: disable=no-member + return 'problem' + return 'other' + @property def resource_link_id(self): """ diff --git a/setup.py b/setup.py index 0f007a0..fa34929 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def is_requirement(line): setup( name='lti_consumer-xblock', - version='1.3.0', + version='1.3.1', description='This XBlock implements the consumer side of the LTI specification.', packages=[ 'lti_consumer', -- GitLab