You should use the passive in this case: 私は犬に宿題を食べられました。They have this thing called indirect passive where the action done by someone/something else affects the speaker. You would not translate that with a passive, but Japanese uses the passive because the damage was cause by something exterior.