Closed dcadams closed 2 years ago
You are probably aware of some of these:
https://github.com/arpitgandhi-xoriant/lti_params_api/blob/7585d8fd434ad37694b4fb3964535a2288bba197/views.py#L21 This is a list of usage_ids. Should rename the var appropriately.
https://github.com/arpitgandhi-xoriant/lti_params_api/blob/7585d8fd434ad37694b4fb3964535a2288bba197/views.py#L20 Let's try to keep the 'get' small. Create a new file utils.py with a helper function that returns the list of usage_ids.
https://github.com/arpitgandhi-xoriant/lti_params_api/blob/7585d8fd434ad37694b4fb3964535a2288bba197/views.py#L35 Move the get_block_data to utils.py also.
When I tried the api out on my course with a single lti_advantage_consumer it returned an empty list. This is because the code here: https://github.com/openedx/edx-platform/blob/f773f671220259573398bba33ad7dce6377980d7/openedx/features/course_experience/utils.py#L186 doesn't contain 'lti_advantage_consumer'.
IBL get around this by copying the entire module into their code and making that one modification: https://github.com/cisco-ibleducation/ibl-edx-user-standing-api/blob/koa-tutor-plugin/ibl_edx_user_standing_api/patches/koa_course_experience_utils.py
Not a good thing to do but then the edX code is pretty poor hard coding a list. I don't think there's a better way around this but have a think about it.
Hi @dcadams We have updated the repo with first three points covered in latest commit. Please have a look.
Closing the issue as it is all covered.
You are probably aware of some of these:
https://github.com/arpitgandhi-xoriant/lti_params_api/blob/7585d8fd434ad37694b4fb3964535a2288bba197/views.py#L21 This is a list of usage_ids. Should rename the var appropriately.
https://github.com/arpitgandhi-xoriant/lti_params_api/blob/7585d8fd434ad37694b4fb3964535a2288bba197/views.py#L20 Let's try to keep the 'get' small. Create a new file utils.py with a helper function that returns the list of usage_ids.
https://github.com/arpitgandhi-xoriant/lti_params_api/blob/7585d8fd434ad37694b4fb3964535a2288bba197/views.py#L35 Move the get_block_data to utils.py also.
When I tried the api out on my course with a single lti_advantage_consumer it returned an empty list. This is because the code here: https://github.com/openedx/edx-platform/blob/f773f671220259573398bba33ad7dce6377980d7/openedx/features/course_experience/utils.py#L186 doesn't contain 'lti_advantage_consumer'.
IBL get around this by copying the entire module into their code and making that one modification: https://github.com/cisco-ibleducation/ibl-edx-user-standing-api/blob/koa-tutor-plugin/ibl_edx_user_standing_api/patches/koa_course_experience_utils.py
Not a good thing to do but then the edX code is pretty poor hard coding a list. I don't think there's a better way around this but have a think about it.