The .co file of downloaded submissions has to contain the (original) file_id of the respective files, not the "id".

Otherwise, the merge of the files does not work and will result in duplicate files...
This commit is contained in:
Ralf Teusner
2017-11-22 16:20:56 +01:00
parent 0cee275278
commit 1369f9285b

View File

@ -390,7 +390,7 @@ class SubmissionsController < ApplicationController
content += "#{request.base_url}/evaluate\n"
@submission.files.each do |file|
file_path = file.path.to_s == '' ? file.name_with_extension : File.join(file.path, file.name_with_extension)
content += "#{file_path}=#{file.id.to_s}\n"
content += "#{file_path}=#{file.file_id.to_s}\n"
end
File.open(path, "w+") do |f|
f.write(content)