Hi Dom
You can bribe me. I'm a politician. You can trust me
I'm a sucker for cheasey thin-crust Dominos pizza. If you can't push a pizza through your modem, I'll do it pro-bono for you. From what I can see, your main beef with the stripped code is found in your post here.
https://moodle.org/mod/forum/discuss.php?d=341355
I have replied there with code screenshots and a dose of optimism.
One pizza to go? Haha!
Regards
Frankie Kam