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 45 forks source link

Feature request {mygroups},{mygroupsassistants},{mygroupsteachers} #193

Closed Bjoern-Ge closed 2 years ago

Bjoern-Ge commented 2 years ago

Hello Michael, Thanks for this plugin. It would be great to have tags for group information. Helpful would be:

{groupin} to display the name of the group or groups the user is in. Then texts like: “You are in the group Mr. Bean” would be easy to make. It is also possible with {ifingroup id|idnumber}{/ifingroup}, but for a lot of groups this tag would be way easier. {groupassistant} The tag could name the non-editing teachers of the groups the user is in. {groupteacher} The tag could name the teachers of the groups the user is in.

It would be great for me if this could become a part of filtercodes.

michael-milette commented 2 years ago

Hi @Bjoern-Ge ,

Thank you for your suggestion. Could you give me an example or two of how this would actually be used and what it would look like?

Best regards,

Michael

Bjoern-Ge commented 2 years ago

Hi Michael, thanks for your reply. Sure, I can give some examples. On our Moodle the students are organised in groups and each group has a teacher with assistant rights (no editing). The Moodle is open to everyone (malo.schule). Schoolteachers can create groups to work on given material with the students. The students sign in to the groups by group-key.

It would be useful to have a text like this: Text before filter: You are in the group {groupin} and {groupassistant} can see your progress in this course. Text after filter: You are in the group Hogwartsschool-9a and Severus Snape can see your progress in this course.

The query {groupin} should reply with the groups the student is in. Text before filter: {groupin} Text after filter example 1: Hogwartsschool-9d Text after filter example 2: Hogwartsschool-9d and Hogwartsschool-Quidditchteam Text after filter example 3: Hogwartsschool-9d, Hogwartsschool-Quidditchteam and Hogwardsschool-potions-and-poison

The query {groupassistant} should reply with the name of the groupassistant of the group the student is in. If the student is in more then one group, all groupassistants of all groups he is in should be listed. Text before filter: {groupassistant} Text after filter example 1: Severus Snape Text after filter example 2: Severus Snape and Minerva McGonagall Text after filter example 3: Dolores Umbridge, Severus Snape and Minerva McGonagall

Here, we only assign Assistents, so we only need {groupassistent}, but of course in other cases {groupteacher} with the same functionality would also be useful.

It would be extremely helpful if these queries would be included. Best regards, Björn

garetharnott commented 2 years ago

Hi Michael and Björn,

Yes this would be an awesome filter to include and use in many places. I think that Björn's suggestions would be easy to implement for multiple groups, but I wonder if Moodle has a way that it orders and reports groups? So if the first {groupin} is always the first group students were registered in, then you would potentially have a way to report just one group and not all.

Other uses for this filter:

  1. feedback on a quiz: "Dear {firstname} it seems like you have not really grasped the concepts yet. Perhaps you could speak to other members of group {groupin} or even {groupassistant} if you are all struggling. Otherwise make an appointment to your lecturer" or "Dear {firstname} - well done! It looks like you have really grasped the core issues of this section. Please can I ask you to reach out to other members of group {groupin} to help those that might be struggling. I am sure they would appreciate your help."
  2. Instructions: "For this assignment you need to first meet with your other team members in group {groupin} and work through the problems. Thereafter you may make one appointment with {groupassistent} to get some feedback before you submit the final assignment."

For me, when I first saw the filtercodes, it was all about how I could use it to personalise the experience of students. It honestly feels like something that should be built into the core of Moodle.

I can't wait to try this out - holding thumbs my IT department plays ball...

regards Gareth

michael-milette commented 2 years ago

Hi @Bjoern-Ge and @garetharnott ,

A new {mygroups} tag has been added to FilterCodes here on GitHub. When you have a moment, I would appreciate it if you would please try it out and let me know if it works for you. If it works for you, it will be included in the next release of FilterCodes on GitHub around the same time as Moodle 4.0 in the near future.

This new tag produces a list of group names to which a person belongs, separated by a comma and space.

Example: Please help other members of {mygroups} who might be struggling. Result: Please help other members of Team A, Team B who might be struggling.

Hopefully, I will have time in the near future to work on the other {mygroupsteachers} and {mygroupsassistants} tags (name to be confirmed) in the not-so-distant future.

Hope you find it useful.

Best regards,

Michael

garetharnott commented 2 years ago

Thank you Michael - I will have to hear from Björn as my IT won't install this on a development platform yet as they have been having lots of technical issues to deal with (totally unrelated to this) and they are prepping for the move to Moodle 4.0. They said they would only implement if they knew it was going to work on Moodle 4.0. I will still be pushing for this as I believe there will be significant interest, but they are under stress right now and so I got the knee-jerk reaction...

Gareth

michael-milette commented 2 years ago

Hi @garetharnott ,

FilterCodes not only will but it already does work on Moodle 4.0 alpha. I've tested it all of the tags and have already fixed anything that I came across which did not work correctly. The same version is still compatible with previous versions of Moodle too.

If you find anything that does not work as well or better than in did in previous versions of Moodle, please let me know. The only thing that currently needs work is the documentation on how to patch a theme so that FilterCodes work properly in Moodle 4.0's custom menu. The code is already done but I am waiting for a Moodle 4.0 themes nased on Boost to become available to test it - other than Boost itself. Custom menus in themes based on Classic continue to be compatible with the documentation.

Be sure to use the version of FilterCodes here on GitHub as the version on Moodle.org won't be updated for 4.0 until around the time of its official release (currently scheduled for April).

Let me know if you or your IT team have any further concerns.

Best regards,

Michael

michael-milette commented 2 years ago

Let your Moodle team know that I would also be happy to be of service to help them through the transition to 4.0. They can contact me through my website at www.tngconsulting.ca/contact

Best regards,

Michael

Bjoern-Ge commented 2 years ago

Hi @michael-milette, Thanks a lot, I tested it yesterday, and it worked good for me. I couldn’t find any unexpected behaviour.

One thing that would be useful to integrate it into text would be an output like: “Team A, Team B and Team C” instead of “Team A, Team B, Team C”

Best Regards,

Björn

michael-milette commented 2 years ago

Hi @Bjoern-Ge ,

I agree with you that it would be better to have it in the format A, B and C, and it is something that I did consider. Ok, you got it. See latest version here on GitHub.

Here are some examples of the integrated text that the tag will produce:

0 groups: [Note: Nothing will be displayed] 1 group: Team A 2 groups: Team A and Team B 3+ groups: Team A, Team B and Team C

Example: Please help other members of {mygroups} who might be struggling. Result: Please help other members of Team A and Team B who might be struggling.

Best regards,

Michael

michael-milette commented 2 years ago

As I have not heard back from you, I will assume that everything is working as expected. I will be closing this ticket as I am preparing the release of FilterCodes.

Best regards,

Michael