Meaning: This sentence means that the teacher was feeling good and handed over a quiz to the people who are learning at a school or college.
Choice of Words: Happily means feeling pleasure or contentment. Gave is the past tense of the verb give, which means to hand over something to someone. Students are people who are learning at a school or college.