Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_course
daiao 5 years ago
commit c34bec9ff5

@ -107,7 +107,7 @@ class HomeworkCommonsController < ApplicationController
student_works = @homework.all_works
@all_member_count = student_works.size
if @homework.publish_time.nil? || (@homework.publish_time > Time.now)
if @homework.publish_time.blank? || (@homework.publish_time > Time.now)
@student_works = []
if (params[:format] == "xlsx") || (params[:format] == "zip")
normal_status(-1,"作业未发布")

@ -266,9 +266,11 @@ class MyshixunsController < ApplicationController
if content != last_content
@content_modified = 1
author_name = current_user.full_name
author_name = current_user.real_name
author_email = current_user.mail
message = params[:evaluate] == 0 ? "System automatically submitted" : "User submitted"
uid_logger("112233#{author_name}")
uid_logger("112233#{author_email}")
@content = GitService.update_file(repo_path: @repo_path,
file_path: path,
message: message,

@ -31,7 +31,7 @@ class ExercisePublishNotifyJob < ApplicationJob
Tiding.bulk_insert(*attrs) do |worker|
teacher_ids = teachers.pluck(:user_id)
unless exercise.tidings.exists?(parent_container_type: 'ExercisePublish', user_id: teacher_ids)
teacher_ids.find_each do |user_id|
teacher_ids.each do |user_id|
worker.add same_attrs.merge(user_id: user_id)
end
end

@ -2,7 +2,7 @@ class HomeworkEndUpdateScoreJob < ApplicationJob
# 不允许补交的作业截止后,或者补交截止后需要重新计算一次作业成绩
queue_as :score
def perform(*args)
def perform(homework_id)
homework = HomeworkCommon.find_by(id: homework_id)
return if homework.blank?
course = homework.course

@ -404,7 +404,6 @@ class User < ApplicationRecord
# 用户的真实姓名(不考虑用户是否隐藏了真实姓名,课堂模块都用真实姓名)
def real_name
return '游客' unless logged?
name = lastname + firstname
name.blank? ? (nickname.blank? ? login : nickname) : name
name.gsub(/\s+/, '').strip #6.11 -hs

@ -49,7 +49,7 @@ wb.styles do |s|
end #each_with_index
sheet.add_row poll_users_info, :height =>15, :style => blue_cell
poll_users.each_with_index do |u,index|
poll_users.includes(user: :user_extension).each_with_index do |u,index|
u_user = u.user
user_answer_array = []
poll_questions.each do |q|

Loading…
Cancel
Save