diff --git a/README.rst b/README.rst index e6a3cb7e447e4886332b606247b7dad769171cb0..605a3bf1881890c670baebabc38e40117af29f4e 100644 --- a/README.rst +++ b/README.rst @@ -367,6 +367,11 @@ Changelog Please See the [releases tab](https://github.com/edx/xblock-lti-consumer/releases) for the complete changelog. +3.4.3 - 2022-02-01 +------------------ + +* Fix LTI 1.1 template rendering when using embeds in the platform + 3.4.2 - 2022-02-01 ------------------ diff --git a/lti_consumer/__init__.py b/lti_consumer/__init__.py index 387377ef5e92b4d1df57179d032a854329aa2d19..f8fb0f62893044b6beb8b0f8667812adb9e2c8d0 100644 --- a/lti_consumer/__init__.py +++ b/lti_consumer/__init__.py @@ -4,4 +4,4 @@ Runtime will load the XBlock class from here. from .apps import LTIConsumerApp from .lti_xblock import LtiConsumerXBlock -__version__ = '3.4.2' +__version__ = '3.4.3' diff --git a/lti_consumer/lti_1p1/contrib/django.py b/lti_consumer/lti_1p1/contrib/django.py index eef2dac1b42c4e58bf96128caa4484adcad5ee0e..7976f9e1d4c3307283c5b88c4eb98d3752ddb470 100644 --- a/lti_consumer/lti_1p1/contrib/django.py +++ b/lti_consumer/lti_1p1/contrib/django.py @@ -125,5 +125,5 @@ def lti_embed( # Render the form template and return the template loader = ResourceLoader(__name__) - template = loader.render_mako_template('../../templates/html/lti_launch.html', context) + template = loader.render_django_template('../../templates/html/lti_launch.html', context) return template diff --git a/lti_consumer/lti_1p1/contrib/tests/test_django.py b/lti_consumer/lti_1p1/contrib/tests/test_django.py index 3925478927afcca08a5e7b82baf70960388c4413..5ff4cdda408628f8c0581fa85dde53668792e95a 100644 --- a/lti_consumer/lti_1p1/contrib/tests/test_django.py +++ b/lti_consumer/lti_1p1/contrib/tests/test_django.py @@ -105,10 +105,10 @@ class TestLtiEmbed(TestCase): mock_set_custom_parameters.assert_called_with(expected_custom_parameters) @patch('lti_consumer.lti_1p1.contrib.django.LtiConsumer1p1.generate_launch_request', Mock(return_value={'a': 1})) - @patch('lti_consumer.lti_1p1.contrib.django.ResourceLoader.render_mako_template') - def test_make_template_rendered_with_correct_context_and_returned(self, mock_render_mako_template): + @patch('lti_consumer.lti_1p1.contrib.django.ResourceLoader.render_django_template') + def test_make_template_rendered_with_correct_context_and_returned(self, mock_render_django_template): fake_template = 'SOME_TEMPLATE' - mock_render_mako_template.return_value = fake_template + mock_render_django_template.return_value = fake_template rendered_template = lti_embed( html_element_id=self.html_element_id, @@ -132,5 +132,5 @@ class TestLtiEmbed(TestCase): 'launch_url': self.lti_launch_url, 'lti_parameters': {'a': 1} } - mock_render_mako_template.assert_called_with(ANY, expected_context) + mock_render_django_template.assert_called_with(ANY, expected_context) self.assertEqual(rendered_template, fake_template)