This commit is contained in:
BoHung Chiu 2020-09-15 17:12:42 +08:00
parent ceac6ff879
commit fc9785034d
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@
<!-- File --> <!-- File -->
<% <%
files_hash = {} files_hash = {}
["selected_course_syllabus_file", "selected_course_progress_file", "selected_course_activity_file", "selected_course_multimedia_file", "selected_course_material_file", "selected_course_supplement_file", "selected_course_evaluation_file"].each do |file| ["course_syllabus_file", "course_progress_file", "course_activity_file", "course_multimedia_file", "course_material_file", "course_supplement_file", "course_evaluation_file"].each do |file|
hash = {} hash = {}
hash["html"] = add_attribute("form_file", f, file.pluralize.to_sym) hash["html"] = add_attribute("form_file", f, file.pluralize.to_sym)
hash["count"] = @course.send(file.pluralize).count rescue 0 hash["count"] = @course.send(file.pluralize).count rescue 0