mitodl / salt-ops

Repository for building, managing and deploying salt-based infrastructure
BSD 3-Clause "New" or "Revised" License
47 stars 7 forks source link

Update LTI xblock #82

Closed pdpinch closed 8 years ago

pdpinch commented 8 years ago

the LTI Xblock has been updated a few times since dogwood, including some changes that Kyle made to support SGA-LTI. Although I don't know of any use case for SGA-LTI on the residential stack, it seems prudent to make the update now -- especially since MatLab may be depending on this XBlock.

I believe 1.0.9 is the most recent version. See https://github.com/edx/edx-platform/pull/12683/commits/8ce63fef9b8c9d53902add65421784879858231c

blarghmatey commented 8 years ago

Cherrypicked in mitodl/edx-platform#1

pdpinch commented 8 years ago

I've been testing this with sga-lti, which has a dependency on version 1.0.8 or greater. It isn't working in my test course:

https://dogwood-qa-draft.mitx.mit.edu/courses/MITx/TEST101/2014_Spring/courseware/aec449f629c247f4b1e656318b46c48f/1d54a85e837d4ce7ad1b7995af0f7cce/

I suspect that the update to xblock-lti-consumer didn't take properly, because it doesn't seem to be passing the fields that were added in version 1.0.8, namely:

lis_person_contact_email_primary:"pdpinch@mit.edu"
lis_person_sourcedid:"pdpinch"
custom_component_display_name:"Assignment+1"

In addition, I also noticed that we're passing the wrong server name:

resource_link_id:"lms-staging.mitx.mit.edu-i4x-MITx-TEST101-lti_consumer-70c9fbb233be436594bb28572d0ef113"
lis_outcome_service_url:"https://lms-staging.mitx.mit.edu/courses/MITx/TEST101/2014_Spring/xblock/i4x:;_;_MITx;_TEST101;_lti_consumer;_70c9fbb233be436594bb28572d0ef113/handler_noauth/outcome_service_handler"
pdpinch commented 8 years ago

Different error today:

Internal Server Error: /courses/MITx/TEST101/2014_Spring/xblock/i4x:;_;_MITx;_TEST101;_lti_consumer;_70c9fbb233be436594bb28572d0ef113/handler/lti_launch_handler
Traceback (most recent call last):
 File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
   response = wrapped_callback(request, *callback_args, **callback_kwargs)
 File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
   return func(*args, **kwargs)
 File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 912, in handle_xblock_callback
   return _invoke_xblock_handler(request, course_id, usage_id, handler, suffix, course=course)
 File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/module_render.py", line 1018, in _invoke_xblock_handler
   resp = instance.handle(handler, req, suffix)
 File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/xblock/mixins.py", line 89, in handle
   return self.runtime.handle(self, handler_name, request, suffix)
 File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1277, in handle
   return super(MetricsMixin, self).handle(block, handler_name, request, suffix=suffix)
 File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/xblock/runtime.py", line 1025, in handle
   results = handler(request, suffix)
 File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/lti_consumer/lti_consumer.py", line 652, in lti_launch_handler
   context = self._get_context_for_template()
 File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/lti_consumer/lti_consumer.py", line 832, in _get_context_for_template
   'display_name': self.ugettext(self.display_name),
AttributeError: 'LtiConsumerXBlockWithMixins' object has no attribute 'ugettext'

@blarghmatey would you mind confirming (again) what version of xblock-lti-consumer we have on dogwood-qa-draft.mitx.mit.edu ?

blarghmatey commented 8 years ago

This has been successfully upgraded with the latest deployment.

pdpinch commented 8 years ago

XBlock dependencies are deliberately vague in xblock-lti-consumer (https://github.com/edx/xblock-lti-consumer/commit/32a320acbd1a2d54360c99b207e4ebd6751ec15a) but the changes that we need should have been complete with 1.0.7. Let's try that.

@blarghmatey

blarghmatey commented 8 years ago

This has been updated and installed. It should be ready for testing.