Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_cs_new
杨树明 6 years ago
commit 91f75c7d38

@ -81,8 +81,6 @@ class AccountsController < ApplicationController
return normal_status(-2, "错误的账号或密码")
end
@user.update_column(:last_login_on, Time.now)
successful_authentication(@user)
session[:user_id] = @user.id
@ -124,7 +122,7 @@ class AccountsController < ApplicationController
set_autologin_cookie(user)
UserAction.create(:action_id => user.try(:id), :action_type => "Login", :user_id => user.try(:id), :ip => request.remote_ip)
user.update_column(:last_login_on, Time.now)
# 注册完成后有一天的试用申请(先去掉)
# UserDayCertification.create(user_id: user.id, status: 1)
end

@ -1350,7 +1350,6 @@ class HomeworkCommonsController < ApplicationController
@course_member_count = @course.course_groups.count
@course_groups = @course.course_groups.page(@page).per(@limit)
@ungroup_user_ids = @course.course_members.ungroup_students.pluck(:user_id)
logger.info("#####course_member_count: #{@course_member_count}, course_groups: #{@course_groups.count}")
end
# 班级作品查重

@ -7,7 +7,7 @@ json.group_list do
end
end
# 未分班展示情况放在最后
if (@course_groups.count != @limit.to_i && @course_groups.count < @limit.to_i) ||
if (@course_groups.count != 0 && @course_groups.count < @limit.to_i) ||
((@page.to_i - 1)*@limit.to_i == @course_member_count && @course_groups.count == 0)
ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids)
if ungroup_work_count > 0

Loading…
Cancel
Save