This is already in Moodle, start by looking at Grades and below. The grades are shown along with the totals so you can see where they are under performing. This works at a course level and I'm fairly certain at a site level with cohorts etc. But I don't know for certain. You'd have to investigate starting with the documentation link I've given.