blonkm/schoology-improved

Rename original file for single file download

Closed this issue · 1 comments

When a set of files is downloaded all files are renamed to include the group name. When a single file is downloaded, the original file name is used. Often students don't use descriptive names for their files. A better naming scheme is therefor required.

Suggested is the currently used scheme for sets:
group / student name / id / revision / original-filename

Doing this requires the file to first be downloaded from schoology to the server folder, and then retrieve the file from the server. Currently the file is taken directly from the server.

There's a chance this also solves the access denied error ("This XML file does not appear to have any style information associated with it. The document tree is shown below.")

A possible, simple, but slow implementation is to re-use the full group download. That means when we click on a file, all submissions within the group are downloaded, after which the file will already be on the server with the proper name.

Downside of this is that 1) initially it's slower - but subsequent calls will be fast and 2) there's currently a purge before making the zip file, which means the performance effect of pre-downloading won't be that big.