bobopinna / moodle-enrol_autoenrol

Auto enrol plugin for Moodle. Forked from markward/enrol_autoenrol and reorganised for direct cloning in Moodle tree
13 stars 22 forks source link

Issue: User Filter with profile field #46

Closed erudisiya closed 1 year ago

erudisiya commented 1 year ago

I am facing an issue with the auto-enroll Moodle plugin when enrolment has user filters. Without user filters it works well. Does anyone face the same issue? I am facing the issue with any type of user profile field like text, or dynamic dropdown. Please help. in lib.php return $info->is_available($information, false, $user->id); in method name check_rule() is not working properly.

bobopinna commented 1 year ago

We use User Filter with several user profile fields rules without any problem. Please could you give me more information? Which Moodle and which Autoenrol plugin version do you use? If you found a bug, feel free to share it with us.

erudisiya commented 1 year ago

Hi, Thanks for your reply.

$plugin->version = 2022062000; $plugin->release = '2.3.9';

User with custom profile field value

Screenshot 2023-05-09 at 6 45 00 PM

Dynamic profile field setup

Screenshot 2023-05-09 at 6 50 00 PM Screenshot 2023-05-09 at 6 51 05 PM Screenshot 2023-05-09 at 6 51 52 PM

Here are all details of what I am facing right now. Please help.

bobopinna commented 1 year ago

Hello, Autoenrol (2022062000) was tested on Moodle 4 and should works with standard and core custom field. It uses Moodle availability checker in order to test User filter but I never tested Dynamic Dropdown custom field plugin so the problem could be there or in availability checker. Did you tested a Dynamic Dropdown custom field in activities or resources availability condition? If it also doesn't works with activities and resources the problem should be outside the autoenrol plugin but a more deep evalution is needed to be sure.