Not sure you should have modified enrollib.php - core hack - it will come back and bite you in the future when you upgrade! Maybe you need to rethink your strategy, what about a refund-me block?
General developer forum
Course refund on Moodle
This discussion has been locked so you can no longer reply to it.