feat: only use anonymous user if there is no other choice
Sometimes we need to load the block. Current code always rebinds the block to the anonymous user because we might not have a user. But in many cases we do have a user and may have already loaded and bound the block in question. Check for user and request and if the block is already bound and just use that block if possible or at least load the block with the user you actually have.
Showing
- lti_consumer/models.py 1 addition, 1 deletionlti_consumer/models.py
- lti_consumer/plugin/compat.py 36 additions, 6 deletionslti_consumer/plugin/compat.py
- lti_consumer/signals.py 1 addition, 1 deletionlti_consumer/signals.py
- lti_consumer/tests/unit/plugin/test_views.py 1 addition, 1 deletionlti_consumer/tests/unit/plugin/test_views.py
- lti_consumer/tests/unit/plugin/test_views_lti_ags.py 8 additions, 8 deletionslti_consumer/tests/unit/plugin/test_views_lti_ags.py
- lti_consumer/tests/unit/plugin/test_views_lti_deep_linking.py 1 addition, 1 deletion...consumer/tests/unit/plugin/test_views_lti_deep_linking.py
- lti_consumer/tests/unit/test_lti_xblock.py 2 additions, 2 deletionslti_consumer/tests/unit/test_lti_xblock.py
- lti_consumer/tests/unit/test_models.py 2 additions, 2 deletionslti_consumer/tests/unit/test_models.py
Loading
Please register or sign in to comment