diff --git a/lti_consumer/lti_xblock.py b/lti_consumer/lti_xblock.py index 08789041..51021775 100644 --- a/lti_consumer/lti_xblock.py +++ b/lti_consumer/lti_xblock.py @@ -1130,7 +1130,7 @@ def extract_real_user_data(self): user_data = { 'user_email': None, 'user_username': None, - 'user_full_name': user.full_name, + 'user_full_name': user.full_name.encode(), 'user_language': None, } diff --git a/lti_consumer/tests/unit/test_lti_xblock.py b/lti_consumer/tests/unit/test_lti_xblock.py index f489ee27..cb3a8a3e 100644 --- a/lti_consumer/tests/unit/test_lti_xblock.py +++ b/lti_consumer/tests/unit/test_lti_xblock.py @@ -957,7 +957,7 @@ def setUp(self): fake_user_email = 'abc@example.com' fake_user.emails = [fake_user_email] - full_name_mock = PropertyMock(return_value='fake_full_name') + full_name_mock = PropertyMock(return_value='fáke ñamë') type(fake_user).full_name = full_name_mock fake_username = 'fake' @@ -1814,7 +1814,7 @@ def test_get_lti_1p3_launch_data( fake_user_email = 'fake_email@example.com' fake_username = 'fake_username' - fake_name = 'fake_full_name' + fake_name = 'fáke fǔll ñamë' full_name_mock = PropertyMock(return_value=fake_name) type(fake_user).full_name = full_name_mock