Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the LTI Consumer XBlock #142

Merged
merged 1 commit into from
Mar 1, 2019

Conversation

OmarIthawi
Copy link
Member

@OmarIthawi OmarIthawi commented Jan 6, 2019

The LTI Consumer XBlock expects a couple of extra fields from the runtime, adding those fields so the XBlock can be run from the workbench.

This pull request is required for my work on the LTI Consumer XBlock: openedx/xblock-lti-consumer#44

@openedx-webhooks
Copy link

Thanks for the pull request, @OmarIthawi! I've created OSPR-2957 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams.

Feel free to add as much of the following information to the ticket:

  • supporting documentation
  • edx-code email threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here.

@openedx-webhooks openedx-webhooks added needs triage open-source-contribution PR author is not from Axim or 2U labels Jan 6, 2019
@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed needs triage labels Jan 7, 2019
@natabene
Copy link

natabene commented Jan 7, 2019

@OmarIthawi Thank you for your contribution, please let me know once it is ready to be looked at.

@OmarIthawi
Copy link
Member Author

Thanks @natabene! The PR is ready for review.

@natabene
Copy link

natabene commented Jan 7, 2019

@OmarIthawi Can you look into the failures first?

@OmarIthawi OmarIthawi force-pushed the omar/support-lti-xblock branch 3 times, most recently from ae9a0ba to 3beb61f Compare January 8, 2019 01:54
@OmarIthawi
Copy link
Member Author

Sure @natabene! This repo is mostly abandoned, the test failures are mostly due to outdated dependencies and unrelated to my changes. I'm fixing it anyway.

@OmarIthawi OmarIthawi force-pushed the omar/support-lti-xblock branch from 65582b5 to 0be97a2 Compare January 8, 2019 14:39
@OmarIthawi
Copy link
Member Author

@natabene Could you please ask someone from edX to help me with the broken tests?

I suspect that the broken tests are related to this repo because it's working on my machine and could related to requirements cache.

I'm having this error:

https://github.com/edx/XBlock/blob/8d734587522d98605ecf9a9f79db9d50ca434863/xblock/reference/plugins.py#L200-L205

in the Python tests without a clue on how to solve it.

@natabene
Copy link

natabene commented Jan 8, 2019

@edx/testeng Could you help us out here?

@jmbowman
Copy link

Hi, sorry for the late reply; lost track of this. We hit the same issue again on a newer pull request, I suggested a debugging approach in https://github.com/edx/xblock-sdk/pull/146#issuecomment-463032980 .

@OmarIthawi
Copy link
Member Author

OmarIthawi commented Feb 13, 2019

Thanks @jmbowman! I'll wait a bit and see what comes up of https://github.com/edx/xblock-sdk/pull/146#issuecomment-463032980, as my priorities have shifted a bit this week.

However, I can get back to this PR later.

@jmbowman
Copy link

@OmarIthawi #146 has been merged, you should be clear to rebase and fix this up.

@OmarIthawi
Copy link
Member Author

Thanks @jmbowman! Doing that soon.

@OmarIthawi OmarIthawi force-pushed the omar/support-lti-xblock branch 2 times, most recently from 23ee4f6 to 112f998 Compare February 24, 2019 19:12
@OmarIthawi
Copy link
Member Author

Status: Just pushed the rebased branch, will wait for Travis report. I'll get back to it later and see if there are leftovers I should remove.

@OmarIthawi OmarIthawi changed the title Add support for the LTI Consumer XBlock (WIP) Add support for the LTI Consumer XBlock Feb 24, 2019
@OmarIthawi OmarIthawi changed the title (WIP) Add support for the LTI Consumer XBlock Add support for the LTI Consumer XBlock Feb 25, 2019
@OmarIthawi OmarIthawi force-pushed the omar/support-lti-xblock branch from be1f5ec to 18a82e4 Compare February 25, 2019 10:14
@OmarIthawi
Copy link
Member Author

@jmbowman so this pull request is finally passing. Could you please take a look?

@@ -238,6 +241,8 @@ class WorkbenchRuntime(Runtime):
`self.runtime`.

"""
anonymous_student_id = '7118f8d6-11c3-11e9-a324-7f11806df4d3'
hostname = '127.0.0.1:8000'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should probably be a comment explaining why these are here, otherwise they're likely to be deleted during code cleanup. Also, does anonymous_student_id need to be this particular value or can it be an arbitrary UUID generated during startup?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll keep it a dummy static value, but make it clearer.

I also added tests to those params, so it won't be cleaned up by mistake.

))

def get_real_user(self, _):
"""Return a dummy user."""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method name and its docstring seem to disagree...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I've added a better docstring.

@OmarIthawi OmarIthawi force-pushed the omar/support-lti-xblock branch from 18a82e4 to edb4da4 Compare February 25, 2019 16:21
@OmarIthawi
Copy link
Member Author

Thanks @jmbowman for the review. I've addressed both of your comments, please take another look.

@OmarIthawi OmarIthawi force-pushed the omar/support-lti-xblock branch from edb4da4 to 0f3285b Compare February 26, 2019 06:53
@OmarIthawi
Copy link
Member Author

@natabene I've addressed both of @jmbowman comments, please update the labels on this pull request.

Copy link

@jmbowman jmbowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Sorry for the delayed reply, I missed the push that fixed the tests.

@jmbowman jmbowman merged commit c4868e0 into openedx:master Mar 1, 2019
@openedx-webhooks
Copy link

@OmarIthawi 🎉 Your pull request was merged!

Please take a moment to answer a two question survey so we can improve your experience in the future.

@openedx-webhooks openedx-webhooks added merged and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged open-source-contribution PR author is not from Axim or 2U
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants