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: Unenrol tag #242

Closed behoof closed 1 year ago

behoof commented 1 year ago

Prerequisites

Feature Request - The User Story

The unenroll link in Moodle is hidden and many users can't find it easily. I would like to have a filtercode for unenrol.

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 @behoof ,

I created a {courseunenrolurl} tag for you.

  1. Just add the tag as a link in a course page. When the user clicks the link, it will unenroll them from the current course that they are viewing.

  2. If you want to turn it into a button, you can use the following combination of FilterCodes tags:

{button {courseunenrolurl}}Unenrol me from this course{/button}

  1. If you want to just have a tag and not have to specify the URL, create a {global_unenrol} tag in the FilterCodes setting and put whatever code you want in it. Then you can simply insert the {global_unenrol} tag in your course page to have it show up.

The result will be something like this: image

IMPORTANT: The link will only work if the learner has the ability to unenroll themselves from the course. For more information on that, see: https://docs.moodle.org/en/Enrolment_FAQ#How_do_I_enable_students_to_unenrol_themselves_from_courses.3F

Please note that this new feature is only available here on GitHub. I would appreciate it if you would be so kind as to take a few minutes to try it out and let me know if it works for you. This new feature will be included in the next official release on Moodle.org within the next few days.

Best regards,

Michael Milette

michael-milette commented 1 year ago

This tag is now also available on Moodle.org. Thanks again for your suggestion!