.frame data-executable=file.file_type.executable? data-filename=file.name_with_extension data-renderable=file.file_type.renderable? data-role=file.role data-binary=file.file_type.binary? data-context-type=file.context_type
  - if file.file_type.binary?
    .binary-file data-file-id=file.ancestor_id
      - if file.file_type.renderable?
        - if file.file_type.audio?
          = audio_tag(file.native_file.url, controls: true)
        - elsif file.file_type.image?
          = image_tag(file.native_file.url)
        - elsif file.file_type.video?
          = video_tag(file.native_file.url, controls: true)
      - else
        = link_to(file.native_file.file.name_with_extension, file.native_file.url)
  - else
    .editor-content.d-none data-file-id=file.ancestor_id = file.content
    .editor data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-read-only=file.read_only data-allow-auto-completion=exercise.allow_auto_completion.to_s data-id=file.id
.frame data-executable=file.file_type.executable? data-filename=file.name_with_extension data-renderable=file.file_type.renderable? data-role=file.role data-binary=file.file_type.binary? data-context-type=file.context_type
  - if file.file_type.binary?
    .binary-file data-file-id=file.ancestor_id
      - if file.file_type.renderable?
        - if file.file_type.audio?
          = audio_tag(file.native_file.url, controls: true)
        - elsif file.file_type.image?
          = image_tag(file.native_file.url)
        - elsif file.file_type.video?
          = video_tag(file.native_file.url, controls: true)
      - else
        = link_to(file.native_file.file.filename, file.native_file.url)
  - else
    .editor-content.d-none data-file-id=file.ancestor_id = file.content
    .editor data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-read-only=file.read_only data-allow-auto-completion=exercise.allow_auto_completion.to_s data-id=file.id
Fix download for binary files
Fix download for binary files

openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean