Fix for BLD-465: e-reader error when popping out window. - #1856
Conversation
|
👍 |
There was a problem hiding this comment.
Presumably, some view function needs to call this handle_ajax function, and return the response as a HttpResponse instance. How does the caller know if this function returned an error message? (If it did, the HttpResponse should have some sort of error status code, rather than 200.) It might be better to have this function raise an exception, which the caller can catch.
There was a problem hiding this comment.
If this function will raise Exception, it will be raised in line 594 if module_render.py, so server will generate 500 error. Is it what you want?
There was a problem hiding this comment.
Perhaps a new error type should be added to xmodule/exceptions.py to account for invalid requests, which xmodules could raise to indicate that the request is invalid. However, that seems outside the scope of this pull request, and anyway, I don't think we want to spend more time and effort developing xmodules, so it doesn't seem worthwhile. Since xmodule doesn't support what I was looking for, this is fine.
|
@valera-rozuvan 👍 When Jenkins agrees. |
|
👍 once the tests pass. You can try rebasing your branch onto the latest master to see if that gets the tests to pass. |
Moving work on BLD-465 from PR 1811. Fixing missing import clause in Python. Addressing DB's comment. BLD-465.
Fix for BLD-465: e-reader error when popping out window.
BLD-465
Description of BLD-465
The attached error is seen when attempting to pop out the e-reader in a different window - happens about 50% of the time. Can be seen in 2.03x here: https://courses.edx.org/courses/MITx/2.03x/3T2013/courseware/Course_Text/Textbook/# . Also noted in 4.605x course.
Reviewers
NOTE
Original work was going on in https://github.com/edx/edx-platform/pull/1811 . Create a separate PR so as not to block @olmar .