ndunand / moodle-enrol_attributes

This plugin allows users to be enrolled according to any value stored in their user profile.
https://moodle.org/plugins/enrol_attributes
18 stars 22 forks source link

Rules not saving after update #45

Closed tulgaadai closed 10 months ago

tulgaadai commented 2 years ago

I'm using Moodle 3.8.2+ (Build: 20200402). Few days ago updated enrol_attributes plugin. But after upgrade, having issues. Here's how to reproduce this issue:

  1. Adding new enrollment method on any course with "Enrol by user profile fields" - OK
  2. Configuring rules as old - OK
  3. Click add method - OK
  4. Click on "edit" icon - "User profile fields rules" section is empty.

This issue is the same on existing enrolment method. If i edit existing (added and configured before updating plugin) method it shows up empty "rule" section. And i noticed that if i click on "save changes" button, it clears customtext1 field of current row in xx_enrol table on Database.

gemguardian commented 2 years ago

@tulgaadai have you checked if it is not a PHP issue, as I reported in https://github.com/ndunand/moodle-enrol_attributes/issues/41

tulgaadai commented 2 years ago

Thanks for your support. Tried 7.4 and the result was same. So downgraded enrol_attributes plugin, and now it's working well as old.

ndunand commented 2 years ago

Hi @tulgaadai ,

If i edit existing (added and configured before updating plugin) method it shows up empty "rule" section.

When you encounter this issue, try to reload the page with Javascript disabled, and please post back details here.