diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index cb4ab3c7a..e57a2c59a 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -82,10 +82,10 @@ class ZipdownController < ApplicationController user_zip_paths = homeattaches.map do |homeattach| if homeattach.attachments.count > 0 zip_homework_by_user homeattach - has_file = true if has_file == false + has_file = true unless has_file end end - if has_file == false + unless has_file render file: 'public/no_file_fond.html' , :layout => 'course_base' end zipping "#{Time.now.to_i}_#{bid.name}.zip", user_zip_paths, OUTPUT_FOLDER