Generico Filter - a template maker

Re: Generico Filter - a template maker

by Justin Hunt -
Number of replies: 3
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Alex

I do not think so. The plugin/mod needs to pass the contents of the text area through the filter system, for Generico to be applied. This is not being done right now by the sounds of it. I am sure there is a good reason (eg the page is already half printed by the time the entries are processed)  .. but it is a bit frustrating.

Average of ratings: Useful (1)
In reply to Justin Hunt

Re: Generico Filter - a template maker

by Alex N -

Thanks Justin. I wasn't sure if I was doing something wrong since the Generico filters seem to work in Dataforms but not in Databases.


I have another question about the native variables https://docs.moodle.org/36/en/filter_generico#Generico_Native_Variables

How do I know which field records I can use? USER:firstname returns the users first name but I am sure there are other field records other than firstname that can be used natively.

I am trying to get a user's group picture and name for the particular course to display with a Generico filter but I want to know if that is one of the native variables or if I need to create a dataset for that.

In reply to Alex N

Re: Generico Filter - a template maker

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Have a look at this page, it has a list of native variables. Its for Poodll , but the template system is the same as Generico.

https://support.poodll.com/solution/articles/19000083258-how-do-widgets-work-for-developers-

To know what fields are in the course or user table, you:

For courses try,  @@COURSE:shortname@@ and @@COURSE:fullname@@

For users, @@USER:firstname@@ and @@USER:lastname@@

For pictures, there is a field I put in that just for getting the users profile picture URL because its so common. But I do not know about group pictures. You would need to look at the URL of the group picture and figure out how to build it maybe.




Average of ratings: Useful (1)