anchor.diff:  <!--
   do not put a carriage return in the line below. it will be present in the presentation of the source code, otherwise.
   -->
  -<div id='commentitor' class='editor' data-read-only='true' data-file-id='<%=@request_for_comment.file_id%>'><%= CodeOcean::File.find(@request_for_comment.file_id).content %>
  -</div>
  +<% submission.files.each do |file| %>
  +  <%= (file.path or "") + "/" + file.name +  file.file_type.file_extension %>
  +  <div id='commentitor' class='editor' data-read-only='true' data-file-id='<%=file.id%>'><%= file.content %>
  +  </div>
  +<% end %>
   
   <script type="text/javascript">
     //(function() {
  -    var commentitor = $('#commentitor');
  +    var commentitor = $('.editor');
       var userid = commentitor.data('user-id');
  -    var fileid = commentitor.data('file-id');
   
  -    var inputHtml = ''
  -    //inputHtml += '<form class="form">'
  -    //inputHtml +=   '<div class="form-group">'
  -    //inputHtml +=    '<p style="display:inline-block"><%= t("exercises.implement.comment.line") %></p>'
  -    //inputHtml +=    '<input type="number" class="form-control" id="lineInput" placeholder="1" required>'
  -    //inputHtml +=  '</div>'
  -    inputHtml +=  '<div class="input-group">'
  -    //inputHtml +=    '<p style="display:inline-block"><%= t("exercises.implement.comment.a_comment") %></p>'
  -    inputHtml +=    '<input type="text" class="form-control" id="commentInput" placeholder="I\'d suggest a variable here" required>'
  -    inputHtml +=    '<span class="input-group-btn"><button id="submitComment" class="btn btn-default"><%= t("exercises.implement.comment.addComment") %>!</button></span>'
  -    inputHtml +=  '</div>'
  -    //inputHtml +='</form>'
  +    commentitor.each(function (index, editor) {
  +      currentEditor = ace.edit(editor);
  +      currentEditor.setReadOnly(true);
   
  +      setAnnotations(currentEditor, $(editor).data('file-id'));
  +    });
   
  -    commentitor = ace.edit(commentitor[0]);
  -    commentitor.setReadOnly(true);
  +    function setAnnotations(editor, fileid) {
  +      var session = editor.getSession()
   
  -    setAnnotations();
  -
  -    function setAnnotations() {
  -      var session = commentitor.getSession()
  +      var inputHtml = ''
  +      inputHtml += '<div class="input-group">'
  +      inputHtml +=   '<input type="text" class="form-control" id="commentInput' + fileid + '" '
  +      inputHtml +=     'placeholder="I\'d suggest a variable here" required>'
  +      inputHtml +=   '<span class="input-group-btn"><button id="submitComment' + fileid + '" '
  +      inputHtml +=     'class="btn btn-default"><%= t("exercises.implement.comment.addComment") %>!</button></span>'
  +      inputHtml += '</div>'
   
         var jqrequest = $.ajax({
             dataType: 'json',
  
positive.code:         dataType: 'json',
          method: 'POST',
          url:  "/comments"
        }).done(setAnnotations)
  
        $('.ace_gutter-cell').popover('hide')
      }
  
negative.code: <style>
    #commentitor, .ace_gutter, .ace_gutter-layer { overflow: visible }
    .popover { width: 400px; max-width: none; }
  </style>
  