-
Notifications
You must be signed in to change notification settings - Fork 84
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
Using Assignment and Grades throws an error on Dark language middleware #218
Comments
@giovannicimolin we are also facing this issue #217 |
I have done more investigation.
Full error log below:
|
Additionally, maybe related, DeepLinking seems to work until after changing the configurations on the tool we return to edx, where we get the following message with a 403:
Request URL: POST The response is triggered at
user_has_staff_access to succeed
The weird part is that when we get redirect back to edx the user (superuser) gets logged out. |
@Alain1405 I'm pretty sure I've bumped into this problem before. Let me do some testing on my end. Edit: Also, what's the permission level of your user? Is he superuser or just staff? |
is a superuser.
Do you have comprehensive theming enabled?
We will try and get back to you |
@giovannicimolin I tried setting I think that this issue can be resolved in several ways. For example:
|
@Alain1405 @Alain1405 I hear you on the user issue, and I agree with your suggestions, but there might be a underlying problem we're not seeing that is surfacing this error. The LTI-AGS endpoints are purely for server-to-server communication and should never try to load a template, so I'm wondering why the DarkLang middleware is kicking in.
|
Yes we do.
We'll send soon. |
@giovannicimolin I set the breakpoint in
|
Here is an example of a request that triggers the error:
As far as I understand, this is not a bug in DarkLangMiddleware but in the Lti1p3ApiAuthentication authentication backend, as described by @Alain1405. Returning xblock-lti-consumer/lti_consumer/lti_1p3/extensions/rest_framework/authentication.py Line 79 in 4588b7a
The DarkLangMiddleware fails because it is next in line in processing the response. Modifying the Darklang middleware does allow us to bypass the issue, but there are many places in the code base that assume that request.user is not None, so my (not-very-well-informed) opinion is that we should default to an anonymous user instead.
EDIT: hey I didn't notice @OlhaShyliaieva comment before posting mine :-/ Looks like we were working on this simultaneously. |
@Alain1405 @OlhaShyliaieva @regisb Makes sense! Awesome deep dive investigating the issue. I don't see any other things that might be causing the issue, the LTI request is well-formed and coming in as expected. Can one of you make a PR to change |
@giovannicimolin Hi there, I am new to the openedx, and not that familiar with it, but the same error occurred to me too. I am using tutor 17 and edx-platform quince (development version). So the bugs in lti-xblock-consumer should already be fixed? However, I met the exactly same error in this issue. I wonder how to fix this. Is it because the |
@giovannicimolin I am pretty sure I have set The LTI tools is https://github.com/dmitry-viskov/pylti1.3-flask-example |
The error log in edx is below:
|
Release: Maple
Relevant settings:
ENABLE_COMPREHENSIVE_THEMING=True
LTI consumer settings:
We have configured an LTI 1.3 producer using PyLTI1p3 library (using the Django example).
The connection works fine, however when the tool uses the Assignment and Grades service or Names and Roles service, every time it sends a requests to our Maple instance, it triggers a 500 due to missing
user
at https://github.com/edx/edx-platform/blob/4f49475b94a61c3290c1813f5272277b7986b06c/openedx/core/djangoapps/dark_lang/middleware.py#L159The error is:
The text was updated successfully, but these errors were encountered: