Would you like to be interrupted while learning?
If someone is using the file it will not be a good user experience to immediately stop his work because someone has deleted it. Maybe a student is writing something and has made considerable progress. Or maybe she is reading.
Interrupting users will bring a lot of user frustration and loss of their work, specially when learning new material. This is why you should not allow deletion of a document when it's in use.
Why not allow the user to finish its work and then delete the file? You can also put a notification that the file will be deleted after its closed.
If there is going to be no real time collaboration or live editing features, then the file will be at use only at download time. Therefore, the answer remains the same:
Don't interrupt users when downloading a file, instead wait for the file to be downloaded and then delete it.