I'm looking for a word or phrase that implies stupidity in the context of academics in the same way the term "straight-A student" implies intelligence.
Merriam-Webster has the definition...
dunce - someone who is stupid or slow at learning things
People with the learning disability dyslexia were once simply dismissed as dunces.
The etymology, with focus on the specific term dunce cap as used in a schoolroom/academic context, is more fully covered by this Wikipedia article.
For a more "modern" term (often used facetiously), there's always academically challenged.
An opposite would be a failing or flunking student.