anchor.diff:              <% end %>
               <% content_for :javascripts do %>
                 <script>
  +                var submittedFile = false;
  +
  +                function flashError(message) {
  +                  const elem = $("<div />").prop("id", "flash_error").addClass("error").text(message);
  +                  $("#flashes").append(
  +                    elem
  +                  );
  +
  +                  setTimeout(() => {
  +                    elem.hide(500);
  +                  }, 3000);
  +                }
  +
                   function dropHandler(e) {
                     e.preventDefault();
                     $(".drag-drop-handin").get(0).style = undefined;
  -                  handleFiles(e.dataTransfer.files);
  +                  if (e.dataTransfer.files.length === 1) {
  +                    var fileSelector = $("#handin_show_assessment input[type='file']").get(0);
  +                    fileSelector.files = e.dataTransfer.files;
  +                    if (fileSelector.files.length === 1) {
  +                      showFiles();
  +                      enableSubmit();
  +                    }
  +                  }
                   }
   
                   function dragOverHandler(e) {
  
positive.code:                   } else {
                      $("#fake-submit").removeClass("disabled");
                    }
                  }
                </script>
              <% end %>
              <div class="row handin-row">
  
negative.code:                   e.preventDefault();
                    var fileSelector = $("#handin_show_assessment input[type='file']").get(0);
                    fileSelector.value = null;
                    $(".handin-row").show(function () {
                      enableSubmit();
                    });
                    $(".handedin-row").hide();
                  });
  
                  function enableSubmit() {
  