...
=IF(COUNT(B2:G2)=6,SUM(B2:G2)-SMALL(B2:G2,1),SUM(B2:G2))
Here's an example with SMALL of dropping two items.
=IF(COUNT(B2:G2)=6,SUM(B2:G2)-SMALL(B2:G2,1)-SMALL(B2:G2,2),SUM(B2:G2))
The formula can then be extended downwards to the other students.
...