From e85f63831c1b32c9851ef739101276a64e9b71a3 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 4 Jul 2015 09:35:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=20=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/api_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From 02805fd145cb4d31f1245dba0b445b3ae1d1c549 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 4 Jul 2015 12:12:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E6=98=BE=E7=A4=BA=E6=A0=B7=E5=BC=8F=E5=8F=8A=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=202=E3=80=81=E5=8F=91=E5=B8=83=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 4 ++-- app/views/mailer/send_for_user_activities.html.erb | 6 +++--- config/locales/commons/zh.yml | 2 +- config/locales/zh.yml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) 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? %>