anchor.diff:          context_code: $("#submit_assignment").data('context_code'),
           asset_string: $("#submit_assignment").data('asset_string'),
           intent: "submit",
  -        file_elements: $(this).find("input[type='file']:visible"),
  +        file_elements: $(this).find("input[type='file']:visible").filter(function(){ 
  +          // only include file inputs where user has selected a file, no blank ones.
  +          return $(this).val() !== ''; 
  +        }),
           data: $(this).getFormData(),
           url: $(this).attr('action'),
           success: function(data) {
  
positive.code:       console.log("uploading files");
        $.ajaxJSONPreparedFiles.call(this, {
          handle_files: function(attachments, data) {
            var ids = (data['submission[attachment_ids]'] || "").split(",")
            for(var idx in attachments) {
              ids.push(attachments[idx].attachment.id);
            }
  
negative.code:     $(this).parent().find('.bad_ext_msg').showIf($.inArray(ext, allowed_extensions) < 0);
      checkAllowUploadSubmit();
    });
  });
  window.submissionAttachmentIndex = -1;
  </script>
  