You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #coding=utf-8
-
- namespace :zip do
- desc "手工打包作品"
- task :pack => :environment do
- include ZipService
- include Redmine::I18n
- homework = Object.const_get(ENV['CLASS']).find ENV["ID"]
- file_count = 0
- homework.student_works.map { |work| file_count += work.attachments.count}
- if file_count > 0
- zipfile = zip_homework_common homework
- else
- zipfile = {:message => "no file"}
- end
- puts "out: #{zipfile}"
- end
- end
|