|
|
@ -647,7 +647,7 @@ class StudentWorkController < ApplicationController
|
|
|
|
uid: "#{work.user.user_extensions.student_id}",
|
|
|
|
uid: "#{work.user.user_extensions.student_id}",
|
|
|
|
downloadUrl: ''
|
|
|
|
downloadUrl: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
attachment = work.attachments.first
|
|
|
|
attachment = work.attachments.last
|
|
|
|
if attachment
|
|
|
|
if attachment
|
|
|
|
o[:downloadUrl] = "https://#{Setting.host_name}/"+download_named_attachment_path(attachment.id, attachment.filename)
|
|
|
|
o[:downloadUrl] = "https://#{Setting.host_name}/"+download_named_attachment_path(attachment.id, attachment.filename)
|
|
|
|
end
|
|
|
|
end
|
|
|
|