kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

When managing lesson resources, users cannot see resource counts at the channel card level

Open jonboiser opened this issue 6 years ago • 4 comments

Observed behavior

From a generic lesson on my local server

image

In the lesson, I have 1 resource from Engage NY and 7 from touchable earth, but those details aren't shown at the channel card list.

Expected behavior

A simple counter is shown at the channel card level. There might be an existing message in the code like {count} resources that can be used.

User-facing consequences

At this channel list, coaches don't know which channels are are in the lesson they're working on. They'd need to exit to the summary page to see.

Errors and logs

…

Steps to reproduce

…

Context

…

jonboiser avatar Nov 17 '20 20:11 jonboiser

@jonboiser I would like to work on this issue.

kmrinal19 avatar Mar 19 '21 17:03 kmrinal19

@jonboiser I think that this issue can be solved by getting the ancestors even at the Channels page(by removing the if else construct and always getting the ancestors) as all the contents(even the channels) use the same ContentCardList components. https://github.com/learningequality/kolibri/blob/2e8ca763fd2d7f3d3059e43b1931804f3bb0711f/kolibri/plugins/coach/assets/src/modules/lessonResources/handlers.js#L39-L49

Resource count is displayed through the contentCardMessage prop. https://github.com/learningequality/kolibri/blob/2e8ca763fd2d7f3d3059e43b1931804f3bb0711f/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSelectionPage/index.vue#L49-L63

kmrinal19 avatar Mar 19 '21 19:03 kmrinal19

Yeah, that might be it. Give it a try. Have you looked at the Vuex state and made sure that the channel itself will be inside the cache[resource.contentnode_id].ancestors array? It's possible that it might be missing, and then you'll need to infer the contentnode's channel id from its channel field.

jonboiser avatar Mar 19 '21 19:03 jonboiser

Yeah, that might be it. Give it a try. Have you looked at the Vuex state and made sure that the channel itself will be inside the cache[resource.contentnode_id].ancestors array? It's possible that it might be missing, and then you'll need to infer the contentnode's channel id from its channel field.

Yes, everything looks fine. Let me open a PR towards this issue.

kmrinal19 avatar Mar 19 '21 20:03 kmrinal19