tsauvine / rubyric

Rubric-based assessment tool
4 stars 9 forks source link

Checking the file format of a submitted file #44

Open khanetor opened 8 years ago

khanetor commented 8 years ago

Some students return Images, DOC-files, etc when they should for example submit pdf:s

tsauvine commented 8 years ago

In the exercise configuration, the instructor should be able to give a list of allowed file formats. Valid values could be, for example: pdf .pdf pdf, doc .tar.gz, *.zip

It would be nice to support regexps as well, but we cannot assume a typica instructor knows how to write a rexeps. Therefore, we should automatically recognize whether the input is a regexp.

In submission view, Rubyric should give a clear error message (e.g. Submission was rejected. Only the following formats are allowed: ...). Note that this check cannot be done for submissions coming from A+. In that case, the file format check should be skipped.

khanetor commented 7 years ago

@tsauvine please review pull request #70, remember to run migration because I added an extra column for :exercises table.