A misplaced modifier is a word or a group of words that describes something but sits in the wrong place in the sentence. The reader links it to the wrong word, so the sentence becomes confusing or says something strange.
In the first sentence, "nearly" goes with "saw": you almost saw the students, but in the end you did not. In the second, "nearly" goes with "every student": you saw most of them.
In the first sentence, the guests seem to be sitting on the plates. Put the description right after the thing it describes.
In the first sentence, the backpack seems to be running. When a sentence starts with an action like this, the next words must name the person who does it.
Put a describing word or phrase right next to the word it describes.
If a sentence sounds strange, ask: "Who or what is this phrase about?"
Join 100,000 people who are improving their English skills on the Shaky English app