michael-milette / moodle-filter_filtercodes

FilterCodes filter for Moodle enables content creators to easily customize and personalize course and site content using plain text tags (no HTML). For premium support, contact us at https://www.tngconsulting.ca/contact
https://moodle.org/plugins/filter_filtercodes
GNU General Public License v3.0
32 stars 43 forks source link

Feature Request: {mycoursescards categoryID(s)} if enrolled in courses #241

Closed carlicockrell closed 10 months ago

carlicockrell commented 1 year ago

Prerequisites

Feature Request - The User Story

We like to create dashboards using {coursecards id}. Recently we had a situation where we needed the cards to only show if the student was enrolled in the courses, not just if the course was visible. Layering {ifenrolled} with {coursecards} could be beneficial for a clean "My learning" type of menu.

Screenshots / Mock-ups

No response

Alterative you have considered

No response

Additional information

No response

Planning on submitting a solution in a pull request (PR)?

No

Code of Conduct

michael-milette commented 1 year ago

Hi @carlicockrell ,

Thank you for submitting a feature request. For cards that only include courses in which the user is already enrolled, why not use the FilterCodes {mycoursescards} tag? Alternatively, you could simply use the Courses Overview block included with Moodle.

With regards to layering {ifenrolled} with {coursecards} to create a clean "My learning" type of menu, have you considered using the FilterCodes {mycoursesmenu} tag?

If these are not suitable, please clarify your requirement and offer a real-life example to go with it.

Best regards,

Michael

carlicockrell commented 1 year ago

Thank you for your response.

It is a bit of an odd request because the individual is trying to accomplish mycoursecards as a block, but to group them by category. For example, you have one category of enrolled live events, and one category of enrolled courses.

Here is a sample - imagine each card that shows up is only of courses you are enrolled in. [image: image.png]

Thank you for allowing me to share a real-life use case.

michael-milette commented 1 year ago

Hi @carlicockrell ,

Thank you for your recent message. Unfortunately the image did not come through as you replied by email which does not work very well. If you would be so kind, could you please edit your reply on GitHub and add the missing image?

Best regards,

Michael

carlicockrell commented 1 year ago

I apologize for the delay in getting back to you with the image.

The image using blocks and each block is a course category (intentionally done this way), but wanted to only show the courses the user is enrolled in grouped by categories, instead of just all courses the user is enrolled in. Screenshot 2022-12-28 125007

michael-milette commented 1 year ago

Thanks @carlicockrell . The image came through this time. I understand the desired outcome.

Could you tell me why you need this?

carlicockrell commented 1 year ago

@michael-milette We want to be able to visually separate the enrolled courses into two blocks rather than one main block in order for the users to know which titles are instructor led, and which titles are on-demand (for this specific example). The way filter codes appears is very clean and preferred (once we have all course cards in place at the size we want). We don't want the users to see a menu of courses they can enroll in by category, but rather a menu of already enrolled courses. Due to the nature of the site's multitenancy (MWP), we have to be strategic in how we display the cards as not all courses are open to all tenants. We have strict parameters around which users are able to see these courses. We also want to be able to utilize in-course automated messaging that simply will not occur if the users are not already enrolled in said courses.

michael-milette commented 1 year ago

Hi @carlicockrell ,

Are you looking to display the course cards for an individual category or from all of the categories, grouped by category?

Best regards,

Michael

carlicockrell commented 1 year ago

Hi @michael-milette ,

Honestly, both would be great! However, in this instance, it is enrolled courses in a specific course category, almost like a combination of {mycoursescards} within {coursecards id}, if that makes sense.

michael-milette commented 1 year ago

Hi @carlicockrell ,

Thanks for the suggestion. I have implemented a new option for the {mycoursescards} tag. You can now specify one or more category ids separated by a space. For example:

{mycoursescards 1} or {mycoursescards 1 3 52 10}

When you have multiple categories, the cards will be placed seamlessly together. If you want to have them separate, just create multiple tags.

This new feature is only included with FilterCodes available here on GitHub for now. I would really appreciate it if you would be so kind as to try it out and let me know if it meets your needs. If it does, this feature will be included in the next release of FilterCodes on Moodle.org.

Best regards,

Michael Milette

carlicockrell commented 11 months ago

Hi @michael-milette, I haven't forgotten about this request. I'm going to be testing and will let you know next week how testing pans out! Thank you again for all of your help with this. We love Filter Codes!

carlicockrell commented 11 months ago

@michael-milette We have taken your update for a test, and it is working very well. We concur that this would be great to release to the general population. Thank you so much for the improvement.

michael-milette commented 10 months ago

Hi @carlicockrell ,

Thanks for the feedback. This will be included in the upcoming release on moodle.org within the next few weeks.

Thanks again for the Feature Request!

Best regards,

Michael