diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 3f23d94dc..83a794cd9 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -2023,7 +2023,7 @@ class UsersController < ApplicationController
@flag = true
if params[:send_id].present?
rs = ResourcesService.new
- @ori, @flag, @save_message = rs.send_resource_to_course(params)
+ @ori, @flag, @save_message = rs.send_resource_to_course(User.current, params)
elsif params[:send_ids].present?
send_ids = params[:send_ids].split(",")
course_ids = params[:course_ids]
diff --git a/app/views/users/_resource_share_popup.html.erb b/app/views/users/_resource_share_popup.html.erb
index 68c059a1d..47a84481b 100644
--- a/app/views/users/_resource_share_popup.html.erb
+++ b/app/views/users/_resource_share_popup.html.erb
@@ -8,7 +8,7 @@
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
<% end %>
@@ -20,7 +20,7 @@
<%= form_tag search_user_course_user_path(user),:method => 'get', :remote=>true, :id=> 'search_user_course_form', :class=> 'resourcesSearchBox' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
-
+
diff --git a/app/views/users/_send_homework_to_course.html.erb b/app/views/users/_send_homework_to_course.html.erb
index 67fd36c3c..fc4007d03 100644
--- a/app/views/users/_send_homework_to_course.html.erb
+++ b/app/views/users/_send_homework_to_course.html.erb
@@ -5,8 +5,8 @@
-
-
+
+
<%= render :partial => "users/send_homework_to_course_form", :locals => {:user => user, :courses => courses, :send_id => send_id} %>
diff --git a/app/views/users/_share_message_to_course.html.erb b/app/views/users/_share_message_to_course.html.erb
index 66d44739c..d86c51f0d 100644
--- a/app/views/users/_share_message_to_course.html.erb
+++ b/app/views/users/_share_message_to_course.html.erb
@@ -18,7 +18,7 @@
:remote=>true,:id=>'search_user_course_form',:class=>'resourcesSearchBox' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
-
+
diff --git a/app/views/users/_share_news_to_course.html.erb b/app/views/users/_share_news_to_course.html.erb
index a1a0d6e39..e03a296b2 100644
--- a/app/views/users/_share_news_to_course.html.erb
+++ b/app/views/users/_share_news_to_course.html.erb
@@ -18,7 +18,7 @@
:remote=>true,:id=>'search_user_course_form',:class=>'resourcesSearchBox' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
-
+
diff --git a/lib/tasks/update_homework.rake b/lib/tasks/update_homework.rake
index 3592fe985..7c550b673 100644
--- a/lib/tasks/update_homework.rake
+++ b/lib/tasks/update_homework.rake
@@ -15,10 +15,13 @@ namespace :update_homework do
unless student_works.nil?
student_works.each do |s|
project = Project.find s.project_id
- unless project.nil? && project.gpid.nil?
+ unless project.nil? && project.gpid.blank?
project_time=project.updated_on
project_time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last
- if time.strftime('%Y-%m-%d %H:%M:%S') < project_time.strftime('%Y-%m-%d %H:%M:%S')
+ puts "the time is =========================> #{time}"
+ puts "the project_time is =========================> #{project_time}"
+ #if time.strftime('%Y-%m-%d %H:%M:%S') < project_time.strftime('%Y-%m-%d %H:%M:%S')
+ if format_time(time) < format_time(project_time)
time = project_time
end
begin
@@ -28,7 +31,10 @@ namespace :update_homework do
changesets = g.commits(project.gpid, :ref_name => default_branch)
changesets_latest_coimmit = changesets[0]
unless changesets[0].blank?
- if time.strftime('%Y-%m-%d %H:%M:%S') #{time}"
+ puts "the changesets_latest_coimmit is =========================> #{changesets_latest_coimmit.created_at}"
+ #if time.strftime('%Y-%m-%d %H:%M:%S') < changesets_latest_coimmit.created_at.strftime('%Y-%m-%d %H:%M:%S')
+ if format_time(time) < format_time(changesets_latest_coimmit.created_at)
time = changesets_latest_coimmit.created_at
end
end
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index c2ae2733d..a342a9608 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1601,7 +1601,7 @@ function expand_course_list(id, target, btnid, count) {
target.show();
}else{
btn.data('init',0);
- btn.html('共'+count+ '个课程,点击全部展开');
+ btn.html('共'+count+ '个班级,点击全部展开');
target.hide();
target.eq(0).show();
target.eq(1).show();