cnw-co / moodle-local_cnw_userprofile_cohorts

0 stars 0 forks source link

isues with filtering #6

Open Lysa14 opened 1 year ago

Lysa14 commented 1 year ago

When deleting a previously created filter, the deletion operation remains frozen indefinitely. Additionally, the email filter does not work. It is possible to create filters in the Smartcohort plugin as follows: if the value of the "Email Address" field is equal to, different from, begins with, or ends with a certain value.

I am trying to exclude ALL users who do not have an email address ending in "@my-organization.com" using a filter to populate a cohort named "External Users." However, if I use the "different from" filter (than "@my-organization.com"), it considers all Moodle emails, as they are all different from "@my-organization.com". This results in all Moodle users being added to the cohort, which is not the desired outcome.

If we look at how Moodle's "native" filters work (users -> batch actions on users), it is possible to achieve the desired result by using the "does not contain" filter with "@my-organization.com". I do get the list of external users that I am trying to automatically place in a cohort.

This filter is unusable to properly filter email addresses. It should behave like Moodle's filter.