Previewing text files that do not have the ".txt" extension

Within our programme (and I suppose any computer science-related programme), students work with text files that do not have the ".txt" extension, but, for example, ".c", ".cpp", ".py", ".h" and ".md". For assignments, they also submit these files to Brightspace via the submit points.

When reviewing these assignments, it is highly desirable that these files can be viewed (and possibly annotated) in the BS environment. However, the environment reports for these files that "This file cannot be previewed".

This causes a significant amount of extra work which is, needless to say, quite undesirable. As a computer scientist I (perhaps naively) would assume that this problem could be "easily" fixed by checking the MIME type of the submitted file, so perhaps this already configurable in Brightspace.

Anyhow, my question is how to allow these "disguised" text files to be previewed?
Tagged:

Answers