diff --git a/app/helpers/api_helper.rb b/app/helpers/api_helper.rb index 6c17f8566..d3dc441ae 100644 --- a/app/helpers/api_helper.rb +++ b/app/helpers/api_helper.rb @@ -93,7 +93,7 @@ module ApiHelper def homework_status_desc homework if homework.homework_type == 1 && homework.homework_detail_manual #匿评作业 if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") - link = "启动匿评".html_safe + link = "截止日期之前不可启动匿评" elsif homework.student_works.count >= 2 #作业份数大于2 case homework.homework_detail_manual.comment_status when 1 @@ -104,10 +104,10 @@ module ApiHelper link = " 匿评结束" end else - link = "学生提交作业数大于2时才可以启动匿评" + link = "提交作业数大于2才可启动匿评" end else - link = "未开启匿评作业不可以启动匿评" + link = "未开启匿评作业不可启动匿评" end link end diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 7aa793d82..226ce02bb 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -120,8 +120,8 @@ class Mailer < ActionMailer::Base count = courses.count count = count - 1 for i in 0..count do - bids = courses[i].homework_commons.where("homework_commons.created_at between '#{date_from}' and '#{date_to}'").order(" '#{courses[i].id}', homework_commons.created_at desc") - attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order(" '#{courses[i].id}',attachments.created_on DESC' ") + bids = courses[i].homework_commons.where("homework_commons.created_at between '#{date_from}' and '#{date_to}'").order("homework_commons.created_at desc") + attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order("attachments.created_on DESC' ") @bids += bids if bids.count > 0 @attachments += attachments if attachments.count > 0 end diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 22eb23bf7..264a420cb 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -5,7 +5,7 @@ <% if @attachments.first || @course_news.first || @course_news_comments.first || @bids.first || @course_journal_messages.first|| @course_messages.first || @attachments.first %>
-

<%= l(:label_course_overview)%>

+

<%= l(:label_course_overview)%>

<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>