diff --git a/Gemfile b/Gemfile index cbeade2a3..1305320cf 100644 --- a/Gemfile +++ b/Gemfile @@ -50,10 +50,10 @@ gem 'elasticsearch-model' gem 'elasticsearch-rails' #rails 3.2.22.2 bug - gem "test-unit", "~>3.0" + # gem "test-unit", "~>3.0" ### profile - gem 'oneapm_rpm' + # gem 'oneapm_rpm' group :development do gem 'grape-swagger' diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 5ab85e21d..78c60599a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -3200,6 +3200,7 @@ class UsersController < ApplicationController ori = Attachment.find_by_id(send_id) # 如果该附件已经存课程中,则只更新附件创建时间 mul_container.attachments.each do |att| + @exist = false if att.id == ori.id || (!att.copy_from.nil? && !ori.copy_from.nil? && att.copy_from == ori.copy_from) || att.copy_from == ori.id || att.id == ori.copy_from att.created_on = Time.now att.save diff --git a/app/views/admin/homework.html.erb b/app/views/admin/homework.html.erb index 03472d0a0..aaf21999d 100644 --- a/app/views/admin/homework.html.erb +++ b/app/views/admin/homework.html.erb @@ -38,11 +38,13 @@ <%=link_to(homework.try(:name), student_work_index_path(:homework => homework.id))%> - <% if homework.course %> - - <%= link_to(homework.course.name, course_path(homework.course.id)) %> + + + <% if homework.course %> + <%= link_to homework.course.name, course_path(homework.course.id) %> + <% end %> - <% end %> + <%= homework.try(:user)%><% else %><%=homework.try(:user).try(:realname) %><% end %>'> <% if homework.try(:user).try(:realname) == ' '%> <%= link_to(homework.try(:user), user_path(homework.user_id)) %> diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb index 05ce3bcac..408a6f8e6 100644 --- a/app/views/calendars/show.html.erb +++ b/app/views/calendars/show.html.erb @@ -36,5 +36,5 @@ <% html_title(l(:label_calendar)) -%> diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 759f8c232..d24971be2 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -319,5 +319,5 @@ <% end %> diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index f80977927..98c06aafb 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -17,10 +17,10 @@ + <% end %> - <% end %> \ No newline at end of file diff --git a/app/views/pull_requests/index.html.erb b/app/views/pull_requests/index.html.erb index 2af67293f..1001557ae 100644 --- a/app/views/pull_requests/index.html.erb +++ b/app/views/pull_requests/index.html.erb @@ -1,4 +1,4 @@ -<%= render :partial => "pull_requests/pull_request_container" %> +<%#= render :partial => "pull_requests/pull_request_container" %>