arpitgandhi-xoriant / lti-params-api

0 stars 0 forks source link

Display name and empty list #2

Closed dcadams closed 2 years ago

dcadams commented 2 years ago

Here: https://github.com/arpitgandhi-xoriant/lti_params_api/blob/331f1c5b30d92ca1dacca353ed54f5fb3de32248/utils.py#L25

you are getting the display_name from the component but we actually want the display_name from the vertical.

Here: https://github.com/arpitgandhi-xoriant/lti_params_api/blob/331f1c5b30d92ca1dacca353ed54f5fb3de32248/utils.py#L8

I don't know why you have the [] at the end of all these lines. I don't think they are doing anything other than making the code less readable.

============ ok, following on from our discussion that it's because None is returned if there isn't a child. The way to handle that is by providing a default value: for chapter in course_block_tree.get('children', []):

RiteshChouhan21 commented 2 years ago

Both the suggestions are covered in latest commit. Closing the issue.