See the docs for Passing custom parameters to formset forms. In general, you’ll want to assign a different student to each instance of the form, and mark that field as either read-only or disabled. (In this case, I would tend to suggest disabled.)
This topic was also discussed here: Pass different parameters to each form in formset. (The author of the first comment also makes reference to: https://datalowe.com/post/formsets-tutorial-1/.)