Fix bug.
This commit is contained in:
parent
3216f3251c
commit
931171e25e
|
@ -39,9 +39,9 @@ class Course
|
|||
record.student_ids.each do |student_id|
|
||||
selected_course = SelectedCourse.where(:member_profile_id => student_id,:course_id=>record.id).first
|
||||
if selected_course.nil?
|
||||
SelectedCourse.create(:member_profile => MemberProfile.find(student_id) , :course_id=>record.id , :year=>record.year,:course_title_translations=>record.title_translations,:course_objective_translations=>record.objective_translations)
|
||||
SelectedCourse.create(:member_profile => MemberProfile.find(student_id) , :course_id=>record.id , :year=>record.year,:course_title_translations=>record.title_translations)
|
||||
else
|
||||
selected_course.update(:year=>record.year,:course_title_translations=>record.title_translations,:course_objective_translations=>record.objective_translations)
|
||||
selected_course.update(:year=>record.year,:course_title_translations=>record.title_translations)
|
||||
end
|
||||
end
|
||||
student_ids_remove.each do |student_id|
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<label class="control-label muted"><%= t("personal_course.detail") %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :detail_translations do |f| %>
|
||||
<%= f.text_field locale, class: "input-block-level", placeholder: t("personal_course.detail"), value: (@course_assignment.detail_translations[locale] rescue nil) %>
|
||||
<%= f.text_area locale, class: "input-block-level ckeditor", placeholder: t("personal_course.detail"), value: (@course_assignment.detail_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td><%= course_assignment.detail %></td>
|
||||
<td><%= course_assignment.detail.html_safe %></td>
|
||||
<td><%= course_assignment.display_attachments %></td>
|
||||
<td><%= course_assignment.display_assign_date %></td>
|
||||
<td><%= course_assignment.display_deadline %></td>
|
||||
|
|
Loading…
Reference in New Issue