This commit is contained in:
sw 2015-07-04 14:26:26 +08:00
commit e22d2793c9
5 changed files with 10 additions and 10 deletions

View File

@ -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 = "<span class='fr mr10 pr_join_span ' title='作业截止日期之前不可启动匿评'>启动匿评</span>".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

View File

@ -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

View File

@ -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 %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h3>
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_course_overview)%></h3>
<!-- 课程通知 -->
<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
@ -189,7 +189,7 @@
<% if @issues.first || @project_messages.first || @issues_journals.first || @wiki_contents.first || @project_news.first || @project_news_comments.first || @project_journal_messages.first ||
@project_news_comments.first %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h3 class="wmail_h2" style="color:#15BCCF; "><%= l(:label_project_overview_new)%></h3>
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_project_overview_new)%></h3>
<% unless @issues.first.nil? || @issues_journals.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
@ -508,7 +508,7 @@
</div><!--贴吧动态 end-->
<% end %>
<div class="wmail_foot" style="margin-top:20px;color:#2775d2; margin-left:10px;">
<span style="color:#666;"><%= l(:label_mail_policy) %></span>
<span style="color:#474646;"><%= l(:label_mail_policy) %></span>
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>

View File

@ -337,7 +337,7 @@ zh:
#
# 贴吧动态栏
#
lable_bar_active: 问题和反馈动态
lable_bar_active: 贴吧动态
label_my_question: 我要提问
label_my_feedback: 我要反馈

View File

@ -737,7 +737,7 @@ zh:
label_date_to:
label_language_based: 根据用户的语言
label_mail_policy: 邮件策略
label_mail_policy: 您可以修改邮件通知策略
label_send_test_email: 发送测试邮件
label_feeds_access_key: RSS存取键
label_missing_feeds_access_key: 缺少RSS存取键