Skip to content
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

EQM Fix: Use can actually select topics #12265

Conversation

nucleogenesis
Copy link
Member

Summary

Fixes issue following up from #12182 where users could not select entire topics under certain conditions.

Reviewer guidance

When a Topic / Folder has no folders within it AND there are 12 or fewer exercises in it, then the topic should have a checkbox.

Otherwise, topics should not have checkboxes.

Also -- if a particular exercise has been added to another section and all of its questions have been used in another section, then that Exercise should not have checkbox.

@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Jun 11, 2024
@nucleogenesis nucleogenesis added the TODO: needs review Waiting for review label Jun 11, 2024
actuallyHasCheckbox(content) {
return content.kind === ContentNodeKinds.EXERCISE
? this.hasCheckbox(content) && this.unusedQuestionsCount(content) > 0
: this.hasCheckbox(content);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we're assuming here that the API is the thing that matches our given string where we say a folder can only have <=12 resources in it and no sub-folders.

I'm thinking we maybe should be enforcing that on the client-side in order to be sure we will always match our string

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasCheckbox is saying a topic cannot have a checkbox if there is a more property on the response -- that is where the assumption is made against the API in useQuizResources

https://github.com/nucleogenesis/kolibri/blob/463798f2fc4d2fab25ccd5b6d7fc1056795be607/kolibri/plugins/coach/assets/src/composables/useQuizResources.js#L139-L140

@radinamatic radinamatic requested a review from pcenov June 12, 2024 01:00
@pcenov
Copy link
Member

pcenov commented Jun 13, 2024

Hi @nucleogenesis, cool stuff, just noticed the following issues:

  1. When I've used up all of the available questions in the folder it still can be selected and when all of the exercises are showing the '0 questions unused' I still see the 'Select all' checkbox. Here's a video of that:
2024-06-13_15-54-02.mp4
  1. The text 'N questions unused' overlaps with either the coach resources icon or the text:

2024-06-13_14-40-55

2024-06-13_14-42-02

Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows folders to be selected, we have moved the remaining changes needed to follow up issues.

@rtibbles rtibbles merged commit e2384dd into learningequality:develop Jun 14, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend SIZE: small TODO: needs review Waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants