Skip to content

Commit

Permalink
Merge pull request #34 from Harvard-University-iCommons/develop
Browse files Browse the repository at this point in the history
Merge v1.2.4 to master
  • Loading branch information
rascalking committed Sep 4, 2015
2 parents 65053ef + b56608b commit c516558
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 61 deletions.
59 changes: 29 additions & 30 deletions django_auth_lti/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,47 +58,46 @@ def process_request(self, request):
logger.debug('login() took %s s' % t.secs)

lti_launch = {
'custom_canvas_account_id': request.POST.get('custom_canvas_account_id', None),
'lis_outcome_service_url': request.POST.get('lis_outcome_service_url', None),
'lti_message_type': request.POST.get('lti_message_type', None),
'resource_link_id': request.POST.get('resource_link_id', None),
'user_image': request.POST.get('user_image', None),
'lis_outcome_service_url': request.POST.get('lis_outcome_service_url', None),
'lis_course_offering_sourcedid': request.POST.get('lis_course_offering_sourcedid', None),
'selection_directive': request.POST.get('selection_directive', None),
'resource_link_title': request.POST.get('resource_link_title', None),
'resource_link_description': request.POST.get('resource_link_description', None),
'context_id': request.POST.get('context_id', None),
'context_type': request.POST.get('context_type', None),
'context_title': request.POST.get('context_title', None),
'context_label': request.POST.get('context_label', None),
'launch_presentation_locale': request.POST.get('launch_presentation_locale', None),
'context_title': request.POST.get('context_title', None),
'context_type': request.POST.get('context_type', None),
'custom_canvas_account_id': request.POST.get('custom_canvas_account_id', None),
'custom_canvas_account_sis_id': request.POST.get('custom_canvas_account_sis_id', None),
'custom_canvas_api_domain': request.POST.get('custom_canvas_api_domain', None),
'custom_canvas_course_id': request.POST.get('custom_canvas_course_id', None),
'custom_canvas_membership_roles': request.POST.get('custom_canvas_membership_roles', '').split(','),
'custom_canvas_enrollment_state': request.POST.get('custom_canvas_enrollment_state', None),
'custom_canvas_user_id': request.POST.get('custom_canvas_user_id', None),
'custom_canvas_user_login_id': request.POST.get('custom_canvas_user_login_id', None),
'launch_presentation_css_url': request.POST.get('launch_presentation_css_url', None),
'launch_presentation_width': request.POST.get('launch_presentation_width', None),
'launch_presentation_document_target': request.POST.get('launch_presentation_document_target', None),
'launch_presentation_height': request.POST.get('launch_presentation_height', None),
'launch_presentation_locale': request.POST.get('launch_presentation_locale', None),
'launch_presentation_return_url': request.POST.get('launch_presentation_return_url', None),
'launch_presentation_document_target': request.POST.get('launch_presentation_document_target', None),
'launch_presentation_width': request.POST.get('launch_presentation_width', None),
'lis_course_offering_sourcedid': request.POST.get('lis_course_offering_sourcedid', None),
'lis_outcome_service_url': request.POST.get('lis_outcome_service_url', None),
'lis_person_contact_email_primary': request.POST.get('lis_person_contact_email_primary', None),
'lis_person_name_family': request.POST.get('lis_person_name_family', None),
'lis_person_name_full': request.POST.get('lis_person_name_full', None),
'lis_person_name_given': request.POST.get('lis_person_name_given', None),
'lis_person_sourcedid': request.POST.get('lis_person_sourcedid', None),
'lti_message_type': request.POST.get('lti_message_type', None),
'resource_link_description': request.POST.get('resource_link_description', None),
'resource_link_id': request.POST.get('resource_link_id', None),
'resource_link_title': request.POST.get('resource_link_title', None),
'roles': request.POST.get('roles', '').split(','),
'selection_directive': request.POST.get('selection_directive', None),
'tool_consumer_info_product_family_code': request.POST.get('tool_consumer_info_product_family_code', None),
'tool_consumer_info_version': request.POST.get('tool_consumer_info_version', None),
'tool_consumer_instance_contact_email': request.POST.get('tool_consumer_instance_contact_email', None),
'tool_consumer_instance_description': request.POST.get('tool_consumer_instance_description', None),
'tool_consumer_instance_guid': request.POST.get('tool_consumer_instance_guid', None),
'tool_consumer_instance_name': request.POST.get('tool_consumer_instance_name', None),
'tool_consumer_instance_description': request.POST.get('tool_consumer_instance_description', None),
'tool_consumer_instance_url': request.POST.get('tool_consumer_instance_url', None),
'tool_consumer_instance_contact_email': request.POST.get('tool_consumer_instance_contact_email', None),
'lis_person_name_given': request.POST.get('lis_person_name_given', None),
'lis_person_name_family': request.POST.get('lis_person_name_family', None),
'lis_person_contact_email_primary': request.POST.get('lis_person_contact_email_primary', None),
'lis_person_name_full': request.POST.get('lis_person_name_full', None),
'lis_person_sourcedid': request.POST.get('lis_person_sourcedid', None),
'user_id': request.POST.get('user_id', None),
'custom_canvas_user_id': request.POST.get('custom_canvas_user_id', None),
'custom_canvas_api_domain': request.POST.get('custom_canvas_api_domain', None),
'custom_canvas_enrollment_state': request.POST.get('custom_canvas_enrollment_state', None),
'custom_canvas_course_id': request.POST.get('custom_canvas_course_id', None),
'custom_canvas_account_id': request.POST.get('custom_canvas_account_id', None),
'custom_canvas_account_sis_id': request.POST.get('custom_canvas_account_sis_id', None),
'custom_canvas_user_login_id': request.POST.get('custom_canvas_user_login_id', None),
'roles': request.POST.get('roles', '').split(','),
'user_image': request.POST.get('user_image', None),
}
# If a custom role key is defined in project, merge into existing role list
if hasattr(settings, 'LTI_CUSTOM_ROLE_KEY'):
Expand Down
59 changes: 29 additions & 30 deletions django_auth_lti/middleware_patched.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,47 +70,46 @@ def process_request(self, request):

resource_link_id = request.POST.get('resource_link_id', None)
lti_launch = {
'custom_canvas_account_id': request.POST.get('custom_canvas_account_id', None),
'lis_outcome_service_url': request.POST.get('lis_outcome_service_url', None),
'lti_message_type': request.POST.get('lti_message_type', None),
'resource_link_id': resource_link_id,
'user_image': request.POST.get('user_image', None),
'lis_outcome_service_url': request.POST.get('lis_outcome_service_url', None),
'lis_course_offering_sourcedid': request.POST.get('lis_course_offering_sourcedid', None),
'selection_directive': request.POST.get('selection_directive', None),
'resource_link_title': request.POST.get('resource_link_title', None),
'resource_link_description': request.POST.get('resource_link_description', None),
'context_id': request.POST.get('context_id', None),
'context_type': request.POST.get('context_type', None),
'context_title': request.POST.get('context_title', None),
'context_label': request.POST.get('context_label', None),
'launch_presentation_locale': request.POST.get('launch_presentation_locale', None),
'context_title': request.POST.get('context_title', None),
'context_type': request.POST.get('context_type', None),
'custom_canvas_account_id': request.POST.get('custom_canvas_account_id', None),
'custom_canvas_account_sis_id': request.POST.get('custom_canvas_account_sis_id', None),
'custom_canvas_api_domain': request.POST.get('custom_canvas_api_domain', None),
'custom_canvas_course_id': request.POST.get('custom_canvas_course_id', None),
'custom_canvas_enrollment_state': request.POST.get('custom_canvas_enrollment_state', None),
'custom_canvas_membership_roles': request.POST.get('custom_canvas_membership_roles', '').split(','),
'custom_canvas_user_id': request.POST.get('custom_canvas_user_id', None),
'custom_canvas_user_login_id': request.POST.get('custom_canvas_user_login_id', None),
'launch_presentation_css_url': request.POST.get('launch_presentation_css_url', None),
'launch_presentation_width': request.POST.get('launch_presentation_width', None),
'launch_presentation_document_target': request.POST.get('launch_presentation_document_target', None),
'launch_presentation_height': request.POST.get('launch_presentation_height', None),
'launch_presentation_locale': request.POST.get('launch_presentation_locale', None),
'launch_presentation_return_url': request.POST.get('launch_presentation_return_url', None),
'launch_presentation_document_target': request.POST.get('launch_presentation_document_target', None),
'launch_presentation_width': request.POST.get('launch_presentation_width', None),
'lis_course_offering_sourcedid': request.POST.get('lis_course_offering_sourcedid', None),
'lis_outcome_service_url': request.POST.get('lis_outcome_service_url', None),
'lis_person_contact_email_primary': request.POST.get('lis_person_contact_email_primary', None),
'lis_person_name_family': request.POST.get('lis_person_name_family', None),
'lis_person_name_full': request.POST.get('lis_person_name_full', None),
'lis_person_name_given': request.POST.get('lis_person_name_given', None),
'lis_person_sourcedid': request.POST.get('lis_person_sourcedid', None),
'lti_message_type': request.POST.get('lti_message_type', None),
'resource_link_description': request.POST.get('resource_link_description', None),
'resource_link_id': resource_link_id,
'resource_link_title': request.POST.get('resource_link_title', None),
'roles': request.POST.get('roles', '').split(','),
'selection_directive': request.POST.get('selection_directive', None),
'tool_consumer_info_product_family_code': request.POST.get('tool_consumer_info_product_family_code', None),
'tool_consumer_info_version': request.POST.get('tool_consumer_info_version', None),
'tool_consumer_instance_contact_email': request.POST.get('tool_consumer_instance_contact_email', None),
'tool_consumer_instance_description': request.POST.get('tool_consumer_instance_description', None),
'tool_consumer_instance_guid': request.POST.get('tool_consumer_instance_guid', None),
'tool_consumer_instance_name': request.POST.get('tool_consumer_instance_name', None),
'tool_consumer_instance_description': request.POST.get('tool_consumer_instance_description', None),
'tool_consumer_instance_url': request.POST.get('tool_consumer_instance_url', None),
'tool_consumer_instance_contact_email': request.POST.get('tool_consumer_instance_contact_email', None),
'lis_person_name_given': request.POST.get('lis_person_name_given', None),
'lis_person_name_family': request.POST.get('lis_person_name_family', None),
'lis_person_contact_email_primary': request.POST.get('lis_person_contact_email_primary', None),
'lis_person_name_full': request.POST.get('lis_person_name_full', None),
'lis_person_sourcedid': request.POST.get('lis_person_sourcedid', None),
'user_id': request.POST.get('user_id', None),
'custom_canvas_user_id': request.POST.get('custom_canvas_user_id', None),
'custom_canvas_api_domain': request.POST.get('custom_canvas_api_domain', None),
'custom_canvas_enrollment_state': request.POST.get('custom_canvas_enrollment_state', None),
'custom_canvas_course_id': request.POST.get('custom_canvas_course_id', None),
'custom_canvas_account_id': request.POST.get('custom_canvas_account_id', None),
'custom_canvas_account_sis_id': request.POST.get('custom_canvas_account_sis_id', None),
'custom_canvas_user_login_id': request.POST.get('custom_canvas_user_login_id', None),
'roles': request.POST.get('roles', '').split(','),
'user_image': request.POST.get('user_image', None),
}
# If a custom role key is defined in project, merge into existing role list
if hasattr(settings, 'LTI_CUSTOM_ROLE_KEY'):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ window.globals.append_resource_link_id = function(url){
var url_separator = (url.match(/\?/)) ? '&' : '?';
return url + url_separator + 'resource_link_id=' + window.globals.RESOURCE_LINK_ID;
}
return url;
};

$(document).ajaxSend(function(event, jqxhr, settings){
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='django-auth-lti',
version='1.2.2',
version='1.2.4',
packages=['django_auth_lti'],
include_package_data=True,
license='TBD License', # example license
Expand Down

0 comments on commit c516558

Please sign in to comment.