If a teacher said students must view a file before
continuing, then the system needs to be sure to
mark the file as viewed whether it's actually downloaded
or just viewed inline. This wasn't happening
correctly.
Also DRYed up a few methods in the files controller.
fixes#4035
Change-Id: I5ed6fa6e556ed78d85319f99fe84ddee0b4d2033
Reviewed-on: https://gerrit.instructure.com/2640
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>