fix a bug where sometimes on chrome, a user that clicks to upload a file has to select the file twice.
MODIFY
app/views/assessments/_handin_form.html.erb
app/views/assessments/_handin_form.html.erb
document.querySelector("#handin_show_assessment input[type='file']").addEventListener(
"change",
function (e) {
+ console.log("files changed");
showFiles();
},
false
<% end %>
<div class="row handin-row">
<div class="valign-wrapper drag-drop-handin" onclick="clickDrag();" ondrop="dropHandler(event);" ondragover="dragOverHandler(event);" ondragenter="dragEnter(event);" ondragexit="dragExit(event);">
- <p class="center-align" style="color:grey;" onclick="clickDrag();" ondrop="dropHandler(event);" ondragover="dragOverHandler(event);" ondragenter="dragEnter(event);" ondragexit="dragExit(event);"><b>Drag a file here to hand in. Click to select a file.</b> <br /> <span style="font-size: 10px;">Files do not submit automatically.</span></p>
+ <p class="center-align" style="color:grey;" ondrop="dropHandler(event);" ondragover="dragOverHandler(event);" ondragenter="dragEnter(event);" ondragexit="dragExit(event);"><b>Drag a file here to hand in. Click to select a file.</b> <br /> <span style="font-size: 10px;">Files do not submit automatically.</span></p>
</div>
</div>

fix a bug where sometimes on chrome, a user that clicks to upload a file has to select the file twice.