Details
Description
"Require Participant Approval" fails under the following conditions:
- The event is not a paid event.
- The confirmation page is enabled.
In these circumstances, a participant is automatically registered for an event, even if approval is required first!
I tracked down this problem pretty exactly, but am concerned I might break something in an attempt to fix.
If you do NOT have a confirmation screen, the code that sets the "Awaiting Approval" status is in CRM/Event/Form/Registration/Register.php, lines 1295-1299, works well, and is straightforward.
However, if you DO have a confirmation screen, that same "if" block is in CRM/Event/Form/Registration/Confirm.php, lines 530-543. However, a) there's an "elseif" attached to it, and b) it's in an "if" block that only fires on monetary events.
The hack-ish fix would be to add an "Else if non-monetary event, run the 'check for approval' code", but I'm hoping someone with a better understanding of what's happening here can suggest a more elegant solution.