Refactor stub implementation of LTI Provider. BLD-601. - #2029
Conversation
There was a problem hiding this comment.
Don't commit commented-out code to the repository.
|
@wedaly I`m looking for how it possible to launch such stubs manually. Do you know smth about it? |
There was a problem hiding this comment.
The superclass defines a send_response method that accepts a headers kwarg. You should use that to send the headers.
Please let me know when you're ready for me to take another look. |
|
In terms of starting the server manually, you can add a short Python script that starts the server on a particular port. I'd recommend adding this directly in common/djangoapps/terrain/stubs/lti.py for now. It should look something like this: |
|
It looks like the LTI module is setting the hostname for the callback URL here: It's setting it based on the XBlock's https://github.com/edx/edx-platform/blob/master/lms/djangoapps/courseware/module_render.py#L391 We have |
|
@wedaly please continue review. |
There was a problem hiding this comment.
This looks like a private method; if so, it should have an underscore in front to denote that:
_create_content
There was a problem hiding this comment.
made method to be private
|
I made some style comments, and I'm still unsure about explicitly setting http/https for the test environment. You'll also need to rebase and fix merge conflicts. Please let me know when you're ready for another round of review. |
|
@auraz this PR involves some changes to LTI Module also. Please review. |
|
@wedaly please continue review. |
|
👍 but please squash your commits before merging. |
There was a problem hiding this comment.
a) add comment why we do this
b) please remove changes to quoting
Refactor stub implementation of LTI Provider.
Issue: https://edx-wiki.atlassian.net/browse/BLD-601.
@auraz please review.
@wedaly please review.