-
Notifications
You must be signed in to change notification settings - Fork 15
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
Prevent 500 error when staff tries to see discussion as specific student #457
Prevent 500 error when staff tries to see discussion as specific student #457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amirtds It looks to me from lms/djangoapps/courseware/masquerade.py comment:
def filter_displayed_blocks(block, unused_view, frag, unused_context):
"""
A wrapper to only show XBlocks that set `show_in_read_only_mode` when masquerading as a specific user.
We don't want to modify the state of the user we are masquerading as, so we can't show XBlocks
that store information outside of the XBlock fields API.
"""
we have to make sure that data associated with the user and the XBlock instance can't be modified while masquerading as the user. Do you know whether it's possible to change discussion posts as the user while masquerading? It seems possible that some of the user/discussion data is not actually stored using the XBlock fields API in this case.
Also, I wonder if we should look at modifying something in the XBlock package instead so that the default is show_in_read_only_mode = True
, instead of changing each type of XBlock? Not sure there.
@bryanlandia Seems here https://github.com/appsembler/edx-platform/blob/appsembler/ficus/master/common/lib/xmodule/xmodule/x_module.py#L283 we can set the default as |
@amirtds I am having second thoughts about changing this to True globally. The ideal thing would be to keep this as it is, A more complex but possibly better approach given that XBlock authors haven't/won't do this, would be to access some kind of registry set in the dB or ENV.json that provides an override. WDYT? We might even want to run this through a quick tech-design-proposal. |
We might be able to make the smallest change by putting logic in the |
We decided to just merge this for now but make an Issue/Jira task to follow-up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved with idea to look later at more universal fix to this issue across multiple XBlocks
NYIF is testing view as specific student functionality on units that are a mix of different XBlock. We applied this fix to PDF and Scorm but seems they have discussion unit with other XBlock and to make the whole subsection visible as a specific student we need to a turn on this flag on built-in discussion XBlock.