When data is updated, we can update the link to the document students are working on.
All we need to do is set the link property when we update the data.
Hardest part is figuring out exactly which link to go to, which I'm not sure is possible given the current data.
updates[i] = {
    'id': data[i].userId,
    'link': linkToUse
}