My cousin's drama teacher did this. But, they knew about it before the test while the teacher didn't know that they knew. When everyone was done, they all stood up and sang bohemian rhapsody together. The teacher gave each student 15 points.
There's actually a book series (for kids) about it! I loved them! PotC was my first big fandom, just because I thought Captain Jack was such an amazing character! There's a ton of lit published by Disney about all the characters' back stories.