As a Brit, but not a teacher, both would be understandable and acceptable, with the 1st being preferred (on the keep it short & simple - KISS principle).
The 2nd one could be rephrased as:
"we have given you grades for your work", as the grades are not really being given "to" the work but to you for the work that you have done.
Hope this helps
Student or Learner