Project: moodle
Issue MDL-42904: Self enrolment by group key does not work - until group settings are saved again
We have a customer running on Moodle 2.5.2. They are setting up courses using group enrolment keys. I have checked their configuration and it seems correct. If a user attempts to self-enrol on one of these courses, using the correct group key, the receive the error "Incorrect enrolment key, please try again". But the key *is* correct. I have tested this myself. The weird thing is that if you go into the groups page, select the relevant group and choose "edit group settings", then press save (without changing anything at all) then the user can self-enrol. It is as if the group key details have not been properly saved the first time they were set up...although the key has certainly been saved, as you can click the "unmask" checkbox, and the correct key is displayed. The customer can't go through the whole site, hundreds of courses, editing and clicking save on every group in every course. I cannot find anything wrong with the site configuration, the self-enrolment plugin configuration, or the group configuration. It seems to me that this is a bug, although I'd be happy to be proved wrong as long as an explanation of this behaviour is forthcoming. I'd appreciate someone taking a look at this as a matter of urgency - I can arrange access to the site and server if required.
Story points: 8