Get on his good side and youll pass. He needs to show a little more control over his class, so much stuff happeneds in the back of the room...and everywhere else on that matter.
Potter does not care what the students are doing. His class is unsanitary, along with everything else. If he likes a student, he will give him/her a passing grade (A or B). The student does not have to do work assigned and still pass the class.