The teacher praised all the students in the class and Li Xiaoming.

You can't say that. There is a grammatical error. The whole class already includes Li Xiaoming, so don't add Li Xiaoming.

The teacher praised the whole class. Or changed to: The teacher praised Li Xiaoming.

Correcting grammatical mistakes is repetition and mixed sentences.