Commit 8c525d76 by Ned Batchelder Committed by Jason Bau

Revert "username and email request for lti module"

This reverts commit 3f159ea5.

Conflicts:
	common/lib/xmodule/xmodule/lti_module.py
	lms/djangoapps/courseware/tests/test_lti_integration.py
parent 1a67b4fd
...@@ -32,10 +32,6 @@ div.lti { ...@@ -32,10 +32,6 @@ div.lti {
} }
} }
div.ltiTextBox {
width: 280px;
}
form.ltiLaunchForm { form.ltiLaunchForm {
display: none; display: none;
} }
......
...@@ -206,37 +206,7 @@ class LTIFields(object): ...@@ -206,37 +206,7 @@ class LTIFields(object):
default="", default="",
scope=Scope.settings 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 = False # Jason Bau nuking this for now, PII to external parties is bad
request_email = False # Jason Bau nuking this for now, PII to external parties is bad
# 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): class LTIModule(LTIFields, LTI20ModuleMixin, XModule):
""" """
...@@ -362,7 +332,6 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule): ...@@ -362,7 +332,6 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule):
# parsing custom parameters to dict # parsing custom parameters to dict
custom_parameters = {} custom_parameters = {}
for custom_parameter in self.custom_parameters: for custom_parameter in self.custom_parameters:
try: try:
param_name, param_value = [p.strip() for p in custom_parameter.split('=', 1)] param_name, param_value = [p.strip() for p in custom_parameter.split('=', 1)]
...@@ -423,9 +392,6 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule): ...@@ -423,9 +392,6 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule):
'title_postscript': self.title_postscript, 'title_postscript': self.title_postscript,
'grader_feedback_label': self.grader_feedback_label, 'grader_feedback_label': self.grader_feedback_label,
'instruction_text': self.instruction_text, 'instruction_text': self.instruction_text,
'text_box': self.text_box,
'request_username': self.request_username,
'request_email': self.request_email,
} }
def get_html(self): def get_html(self):
...@@ -572,26 +538,6 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule): ...@@ -572,26 +538,6 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule):
u'lis_outcome_service_url': self.get_outcome_service_url() 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. # Appending custom parameter for signing.
body.update(custom_parameters) body.update(custom_parameters)
......
...@@ -92,9 +92,6 @@ class TestLTI(BaseTestXmodule): ...@@ -92,9 +92,6 @@ class TestLTI(BaseTestXmodule):
'grader_feedback_label': 'Feedback on your work from the grader:', 'grader_feedback_label': 'Feedback on your work from the grader:',
'instruction_text': '', 'instruction_text': '',
'title_postscript': '(External Resource)', 'title_postscript': '(External Resource)',
# 'request_username': self.item_descriptor.request_username, # JBAU COMMENTED OUT 9-15-2014
# 'request_email': self.item_descriptor.request_email,
# 'text_box': self.item_descriptor.text_box,
} }
def mocked_sign(self, *args, **kwargs): def mocked_sign(self, *args, **kwargs):
......
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
% if launch_url and launch_url != 'http://www.example.com' and not hide_launch: % if launch_url and launch_url != 'http://www.example.com' and not hide_launch:
% if open_in_a_new_page: % if open_in_a_new_page:
<div class="wrapper-lti-link"> <div class="wrapper-lti-link">
<div class="ltiTextBox">
<span>${text_box}</span>
</div>
<p class="lti-link external"><a target="_blank" class="link_lti_new_window" href="${form_url}"> <p class="lti-link external"><a target="_blank" class="link_lti_new_window" href="${form_url}">
${_('View resource in a new window')} ${_('View resource in a new window')}
<i class="icon-external-link"></i> <i class="icon-external-link"></i>
...@@ -49,7 +46,7 @@ ...@@ -49,7 +46,7 @@
<h3 class="error_message"> <h3 class="error_message">
${_('Please provide launch_url. Click "Edit", and fill in the required fields.')} ${_('Please provide launch_url. Click "Edit", and fill in the required fields.')}
</h3> </h3>
% endif %endif
% if has_score and comment: % if has_score and comment:
% if grader_feedback_label: % if grader_feedback_label:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment