Hmmm,
If your DH loves your daughter and treats her as his own, then it's probably hard to witness her treatment at the hands of her biological father. That said, it is absolutely wrong of him - whether what he is saying about your ex is true or not - to criticise and bad-mouth him in front of your daughter! That is one thing that has to stop! It is incredibly unfair to your daughter!
Your DH has no right to stamp his feet and insist your daughter doesn't see her father. It doesn't matter if your daughter's father is the greatest waste of space on this earth, he is still her dad! He might be feckless but he is not being abusive towards your daughter; she loves him and wants to spend time with him and, tbh, it's my personal opinion that - no matter how loving her stepfather is, she has a right to pursue a relationship with her bio father. In fact, a positive and happy relationship with her bio father should be positively encouraged.
I do, however, for your daughter's sake, think you need to try to get your ex to see the importance of more structured, consistent contact. This piecemeal approach to contact really is not great for your daughter. If contact was regular and set, then it would be better all round and give your DH less ammunition... (I'm wondering why contact is so sketchy and sporadic? Does he have a second family or other issues you haven't mentioned. If your ex can't step up to the mark, then you may have to reconsider the best way forward. For now, though, your daughter deserves the chance to pursue a positive relationship with her bio father.
I think you need to tell your DH that you acknowledge - and to a large extent - appreciate his anger and concern, especially when your ex lets your daughter down, but that his current approach is generally destructive and unhelpful, especially to your daughter who has a right to get to know her father without feeling bad or guilty about it. Does he not realise the burden he puts on your daughter when he openly and strongly criticises her bio father in her presence? It's actually very selfish of him.
As for your DH not wanting you to talk to your ex, that is totally unrealistic. Like it or not, you and your ex have a daughter in common...you're going to have to speak to him at times, for the benefit of your daughter. Your DH is being unreasonable if he expects you never to talk to your ex.. Honestly!
As for the learning mentor, don't beat yourself up! It's a good thing! You're doing your part as a loving mother who has her daughter's best interests at heart! The school has just decided she needs a bit of extra support, that's all...don't about it. It can only benefit your daughter! Tbh, if she is hearing your DH slag off her dad and she senses tension, it's only natural that her school work may suffer a little; I'd probably be worried if she were not struggling a bit.
I think you need to sit down with your DH and have a heart-to-heart. Tell him you love him, have no interest in your ex apart from trying to work with him to ensure your daughter has a healthy, positive relationship she can enjoy with him... Tell him this does not mean you love him any less or even that the daughter he has come to view as his own loves you any less. Tell him you acknowledge your ex's failings as a father and agree with much of what he thinks of him BUT that he absolutely must not criticise him openly in front of her! She should be blissfully unaware of any tension!
Tell your DH that it would be easier if he were on board, you're not hiding anything and you don't want your marriage to suffer BUT it's going to if he keeps picking rows with you about this...
I hope things improve for you.