In the Workshop module, there are capabilities to control this. So it does not matter who did the assessment (whether it was a teacher or a student). What matters is whether the submission author has a capability to see the name of the submission's grader. And vice versa - whether the grader has a capability to see the name of the graded submission's author.
Is it for any type of assignment or only peer reviewed assignment?
Sorry I don't understand this question.