Add exercise description as txt file to downloaded zip
This commit is contained in:
@ -75,6 +75,11 @@ class SubmissionsController < ApplicationController
|
|||||||
zio.write(file.content)
|
zio.write(file.content)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# zip exercise description
|
||||||
|
zio.put_next_entry(t('activerecord.models.exercise.one') + '.txt')
|
||||||
|
zio.write(@submission.exercise.title + "\r\n======================\r\n")
|
||||||
|
zio.write(@submission.exercise.description)
|
||||||
|
|
||||||
# zip .co file
|
# zip .co file
|
||||||
zio.put_next_entry(".co")
|
zio.put_next_entry(".co")
|
||||||
zio.write(File.read id_file)
|
zio.write(File.read id_file)
|
||||||
|
Reference in New Issue
Block a user