<% @site_in_use_locales.each_with_index do |locale, i| %>
<% end %>
<% if params[:id].present? %>
<%= f.hidden_field :course_id, :value => params[:id] %>
<% end %>
<%= f.datetime_picker :assign_date, :no_label => true, :new_record => @course_assignment.new_record?, :data=>{"picker-type" => "range", "range" => "start"} %>
<%= f.datetime_picker :deadline, :no_label => true, :new_record => @course_assignment.new_record?, :data=>{"picker-type" => "range", "range" => "start"} %>
<%
files_hash = {}
["course_attachment"].each do |file|
hash = {}
hash["html"] = add_attribute("form_file", f, file.pluralize.to_sym)
hash["count"] = @course_assignment.send(file.pluralize).count rescue 0
files_hash[file] = hash
%>
<% if !@course_assignment.new_record? && hash["count"] > 0 %>
<% @course_assignment.send(file.pluralize).each_with_index do |obj, i| %>
<% if !obj.new_record? %>
<%= f.fields_for file.pluralize.to_sym, obj do |f| %>
<%= render :partial => "form_file", :object => obj, :locals => {:f => f, :i => i} %>
<% end %>
<% end %>
<% end %>
<% end %>
<%= t(:add) %>
<% end %>
<%= t("personal_course.deadline_hint") %>
<%= t("personal_course.assign_date_hint") %>