Hello Moodlers,
I am trying to make the association between
- The filter chosen in the Filters tab
- What is displayed in the fitter drop box
- What value replaces the %%FILTER_ keyword in my SQL query.
I cannot find a clear examples that shows how to use the filters.
So far, figured out the following when
Filters tab = System User (id)
SQL= SELECT * from prefix_user AS c WHERE 1 %%FILTER_SYSTEMUSER:c.id%%
Will produce a filter dropbox with user.firstname and user.lastlame in the View report tab.
The information is probably taken from this query
SELECT id, firstname, lastname FROM prefix_user
Where
firstname and lastname are displayed in the drop box
The prefix_user.id value (${id_value}) replaces the %%FILTER_SYSTEMUSER keyword in my query
And my query becomes SQL= SELECT * from prefix_course AS c WHERE 1 AND ${id_value}= c.id
The Categories and Course filters have a similar pattern.
But what is the difference between filter course user (id), System user (id) and Ernolled students?
What about Search text, User field filter and User field search box…?
I am completely lost…
Any suggestion/hint?
1000 thanks.
Maxime
Moodle 3.8.2 PHP 7.6 running on Win2019Srv, IIS10, SQL Server 2019