-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Create XBlock permissions for can_view_answer
, can_view_correctness
#33325
Comments
Hi @ormsbee I'm currently working in this issue and wanted to double check with you if the idea is to create a service as the ones described in If not, can you please explain to me how should I create the new runtime service? Thanks a lot! |
@steff456: Yes, those are what I meant. Another place to find a list of example services is in the LMS rendering code: edx-platform/lms/djangoapps/courseware/block_render.py Lines 588 to 638 in b353019
Just a word of warning that this service would need to be instantiated in multiple places, like:
(It might be useful to look for instantiations of |
The ProblemBlock has some sophisticated logic for determining whether the user should be allowed to see the answer (and also whether they were correct or not):
edx-platform/xmodule/capa_block.py
Lines 1400 to 1457 in f9148f0
This has been partially re-implemented in other XBlocks over time. We should refactor this into a runtime service that will return a simple True/False for this question, so that we can get consistent behavior without other XBlock authors having to think about it.
The text was updated successfully, but these errors were encountered: