dev_ec
Alec Zhou 6 years ago
commit b24547f9e0

@ -188,6 +188,7 @@ module ZipService
# file_name = "#{exercise.course_id}-#{exercise.exercise_name}-#{exercise_user.user.user_extensions.student_id}-#{exercise_user.user.show_real_name}" + ".pdf" # file_name = "#{exercise.course_id}-#{exercise.exercise_name}-#{exercise_user.user.user_extensions.student_id}-#{exercise_user.user.show_real_name}" + ".pdf"
# file_name = "#{Time.now.strftime("%Y%m%d%H%M%S").to_s}-#{exercise.course_id}-#{exercise.id}-#{exercise_user.user.user_extensions.student_id}" + ".pdf" # file_name = "#{Time.now.strftime("%Y%m%d%H%M%S").to_s}-#{exercise.course_id}-#{exercise.id}-#{exercise_user.user.user_extensions.student_id}" + ".pdf"
file_name.gsub!(" ", "-") file_name.gsub!(" ", "-")
file_name.gsub!("/", "_")
kit.to_file("#{OUTPUT_FOLDER}/#{file_name}") kit.to_file("#{OUTPUT_FOLDER}/#{file_name}")
out_file = "#{OUTPUT_FOLDER}/#{file_name}" out_file = "#{OUTPUT_FOLDER}/#{file_name}"
out_file out_file
@ -200,6 +201,7 @@ module ZipService
# file_name = "#{homework.course_id}-#{homework.name}-#{student_work.user.user_extensions.student_id}-#{student_work.user.show_real_name}" + ".pdf" # file_name = "#{homework.course_id}-#{homework.name}-#{student_work.user.user_extensions.student_id}-#{student_work.user.show_real_name}" + ".pdf"
# file_name = "#{Time.now.strftime("%Y%m%d%H%M%S").to_s}-#{homework.course_id}-#{homework.id}-#{student_work.user.user_extensions.student_id}" + ".pdf" # file_name = "#{Time.now.strftime("%Y%m%d%H%M%S").to_s}-#{homework.course_id}-#{homework.id}-#{student_work.user.user_extensions.student_id}" + ".pdf"
file_name.gsub!(" ", "-") file_name.gsub!(" ", "-")
file_name.gsub!("/", "_")
kit.to_file("#{OUTPUT_FOLDER}/#{file_name}") kit.to_file("#{OUTPUT_FOLDER}/#{file_name}")
out_file = "#{OUTPUT_FOLDER}/#{file_name}" out_file = "#{OUTPUT_FOLDER}/#{file_name}"
out_file out_file

@ -103,7 +103,7 @@
<% if @trail_authentication.status == 1 %> <% if @trail_authentication.status == 1 %>
sure_box_redirect_without_newtab("<%= user_path(@user) %>", "试用申请已被接受"); sure_box_redirect_without_newtab("<%= user_path(@user) %>", "试用申请已被接受");
<% elsif @trail_authentication.status == 2 %> <% elsif @trail_authentication.status == 2 %>
sure_box_redirect_without_newtab_btn("<%= my_account_path %>", "试用申请已被拒绝<br/>原因:<%= @trail_authentication.reason %>", "重新申请"); sure_box_redirect_without_newtab_btn("<%= my_account_path %>", "试用申请已被拒绝<br/>原因:<%= [@trail_authentication.reason, @trail_authentication.reject_description].join('') %>", "重新申请");
<% end %> <% end %>
<% end %> <% end %>

Loading…
Cancel
Save