Theory:

You see, in the end, Patrick still thought he’d made that tiny man do all his homework. But I’ll share a secret, just between you and me. It wasn’t the elf; Patrick had done it himself!
Explanation:
 
Finally, it was not the elf but Patrick himself who did his work. But PATRICK thought it was the elf who did the work. The elf just drove him to do everything.
 
Meanings of difficult words:
 
Numbers
Word
Meaning
 1.
Secret
Confidential
Reference:
National Council of Educational Research and Training (2006). Honeysuckle. Who did Patrick's Homework - Carol Moore (pp. 7-10). Published at the Publication Division by the Secretary, National Council of Educational Research and Training, Sri Aurobindo Marg, New Delhi.