From 4edeeb72c2413038e87e37913bde6de16ac13728 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 16 Sep 2014 16:13:41 -0400 Subject: [PATCH] Revert "username and email request for lti module" This reverts commit 3f159ea52bc2bec2de436d25b1c6e61e02c375dd. --- common/lib/xmodule/xmodule/css/lti/lti.scss | 4 -- common/lib/xmodule/xmodule/lti_module.py | 54 ------------------- .../courseware/tests/test_lti_integration.py | 3 -- lms/templates/lti.html | 5 +- 4 files changed, 1 insertion(+), 65 deletions(-) diff --git a/common/lib/xmodule/xmodule/css/lti/lti.scss b/common/lib/xmodule/xmodule/css/lti/lti.scss index 30de7d551d..1582a9ca9c 100644 --- a/common/lib/xmodule/xmodule/css/lti/lti.scss +++ b/common/lib/xmodule/xmodule/css/lti/lti.scss @@ -32,10 +32,6 @@ div.lti { } } - div.ltiTextBox { - width: 280px; - } - form.ltiLaunchForm { display: none; } diff --git a/common/lib/xmodule/xmodule/lti_module.py b/common/lib/xmodule/xmodule/lti_module.py index 7fcf4fa9a7..c5e8458f0f 100644 --- a/common/lib/xmodule/xmodule/lti_module.py +++ b/common/lib/xmodule/xmodule/lti_module.py @@ -191,35 +191,6 @@ class LTIFields(object): default=False, scope=Scope.settings ) - """ - Users will be presented with a message indicating that their e-mail/username would be sent to a third - party application. When "Open in new Page" is not selected, the tool automatically appears without any user action. - """ - request_username = Boolean( - display_name=_("Request user's username"), - help=_( - "Requesting user's username will only work if 'Open in a new page' is set to True" - ), - default=False, - scope=Scope.settings - ) - request_email = Boolean( - display_name=_("Request user's email"), - help=_( - "Requesting user's email will only work if 'Open in a new page' is set to True" - ), - default=False, - scope=Scope.settings - ) - - text_box = String( - display_name=_("LTI Application Information"), - help=_( - "Provide a description of the third party application. If requesting username and/or email, use this text box to inform users " - "that their username and/or email will be forwarded to a third party application."), - default="", - scope=Scope.settings - ) class LTIModule(LTIFields, LTI20ModuleMixin, XModule): @@ -346,7 +317,6 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule): # parsing custom parameters to dict custom_parameters = {} - for custom_parameter in self.custom_parameters: try: param_name, param_value = [p.strip() for p in custom_parameter.split('=', 1)] @@ -400,10 +370,6 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule): 'weight': self.weight, 'module_score': self.module_score, 'comment': sanitized_comment, - 'text_box': self.text_box, - 'request_username': self.request_username, - 'request_email': self.request_email, - } def get_html(self): @@ -550,26 +516,6 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule): u'lis_outcome_service_url': self.get_outcome_service_url() }) - self.user_email = "" - self.user_username = "" - - # Username and email can't be sent in studio mode, because the user object is not defined. - # To test functionality test in LMS - - if self.runtime.get_real_user is not None: - real_user_object = self.runtime.get_real_user(self.runtime.anonymous_student_id) - self.user_email = real_user_object.email - self.user_username = real_user_object.username - - if self.request_username and self.user_username and self.open_in_a_new_page: - body.update({ - u'lis_person_sourcedid': self.user_username - }) - if self.request_email and self.user_email and self.open_in_a_new_page: - body.update({ - u'lis_person_contact_email_primary': self.user_email - }) - # Appending custom parameter for signing. body.update(custom_parameters) diff --git a/lms/djangoapps/courseware/tests/test_lti_integration.py b/lms/djangoapps/courseware/tests/test_lti_integration.py index e54f830180..943d06f0dd 100644 --- a/lms/djangoapps/courseware/tests/test_lti_integration.py +++ b/lms/djangoapps/courseware/tests/test_lti_integration.py @@ -89,9 +89,6 @@ class TestLTI(BaseTestXmodule): 'module_score': None, 'comment': u'', 'weight': 1.0, - 'request_username': self.item_descriptor.request_username, - 'request_email': self.item_descriptor.request_email, - 'text_box': self.item_descriptor.text_box, } def mocked_sign(self, *args, **kwargs): diff --git a/lms/templates/lti.html b/lms/templates/lti.html index 29e46f7f9d..91348a8a5e 100644 --- a/lms/templates/lti.html +++ b/lms/templates/lti.html @@ -26,9 +26,6 @@ % if launch_url and launch_url != 'http://www.example.com' and not hide_launch: % if open_in_a_new_page: