Ah I remember that one, the point was that the teacher was giving Reece bad grades no matter what he submitted. This became clear when he cheated by handing in something that Malcolm had written and still got an F (I think). Lois demanded he give Reece a good grade or she'd out him, even if it made Malcolm look bad, because Malcolm would do fine in life either way.
That show had some great plotlines.