Use file type for exercise show (highlight.js)

This commit is contained in:
Sebastian Serth
2021-11-28 21:40:06 +01:00
parent 2574fdb56f
commit ca5cbed5de

View File

@ -7,4 +7,4 @@
- if file.teacher_defined_assessment?
= row(label: 'file.feedback_message', value: render_markdown(file.feedback_message), class: 'm-0')
= row(label: 'file.weight', value: file.weight)
= row(label: 'file.content', value: file.native_file? ? link_to_if(policy(file).show?, file.native_file.file.filename, file.native_file.url) : code_tag(file.content))
= row(label: 'file.content', value: file.native_file? ? link_to_if(policy(file).show?, file.native_file.file.filename, file.native_file.url) : code_tag(file.content, file.file_type.programming_language))