sensei icon indicating copy to clipboard operation
sensei copied to clipboard

Course List block should have the ability to set the default state of the course enrollment filter

Open m1r0 opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe

I would like the Course List block to show only the courses that the student is enrolled in. There is a Filter for it but there is no option to set the default state.

Describe the solution you'd like

The Course List (or the Course List Filter) block should have the option to select the default enrollment state.

Describe alternatives you've considered

As it stands, one solution is to create the Course List including the Course List Filter, have the "Student Courses" filter enabled, go to the front-end, select the "active" state from the filter, and use the generated URL.

Additional context

6451303-zd-woothemes

m1r0 avatar Jun 27 '23 14:06 m1r0

Support References

This comment is automatically generated. Please do not edit it.

  • [ ] 6451303-zen

github-actions[bot] avatar Jun 27 '23 14:06 github-actions[bot]

@m1r0 I'm not sure I understand this one. When the My Courses page is created, the filter is already set to Active (i.e. enrolled) by default. Would you mind clarifying? Thx!

donnapep avatar Jul 07 '23 15:07 donnapep

Hey, Donna. Yeah, I can see how this might be confusing. Maybe a better issue description would be: you're not able to change the default state of that filter.

When setting up the My Courses page, that filter is hardcoded to active but when you're adding the Course List block manually, you can't set the default value of that filter. Should I update the issue description?

https://github.com/Automattic/sensei/assets/1612178/82fa7599-3e65-49ce-be82-5e94aa03bee6

m1r0 avatar Jul 07 '23 21:07 m1r0

Should I update the issue description?

@m1r0 Yup, I think so. I thought we already had an issue to be able to set the default via the dropdown, but I couldn't find it when I did a search. @Imran92 do you recall any additional context about this?

donnapep avatar Jul 10 '23 13:07 donnapep

@Imran92 do you recall any additional context about this?

Yeah I remember implementing this for the mini project where we made the My Courses page show Course List block. We implemented the 'default option' part which was set in the pattern that the My Course page was created with, but we didn't implement a way to change the default option from UI later as that wasn't necessary at that moment for the My Courses page. To enhance the functionality of the Course List block itself, we can implement it now.

Imran92 avatar Jul 10 '23 14:07 Imran92