Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
huang 2015-09-25 11:47:13 +08:00
commit fa88e50bcd
1 changed files with 77 additions and 79 deletions

View File

@ -118,44 +118,39 @@
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %> <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubTypeHomework fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %> <li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotReadHomework fl":"homepageNewsTypeHomework fl" %>">发布了作业于课程:<%= ma.course_message.course.name %></span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程作业</span>
</li> </li>
<li class="homepageNewsContent fl" style="width:315px;"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)", :onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li> :onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style"> <div style="display: none" class="message_title_red system_message_style">
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %> <% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
<p>好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下</p> <p><%= User.current.lastname + User.current.firstname %>同学你好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:</p>
<p><strong>课程:</strong><%= ma.course_message.course.name %> <p>课程名称<%= ma.course_message.course.name %>
(<%= ma.course_message.course.term %>)</p> (<%= ma.course_message.course.term %>)</p>
<p><strong>作业标题:</strong><%= ma.course_message.name %></p> <p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<% unless ma.course_message.description.blank? %> <p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></p>
<div class="fl"><strong>作业内容:</strong></div> <p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></p>
<div class="ml60"><%= ma.course_message.description.html_safe %></div> <p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<% end %>
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
<p> <p>
同学们抓紧时间提交自己的作品,谢谢! 请抓紧时间提交自己的作品,谢谢!
</p> </p>
<% else %> <% else %>
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p> <p>
<p><strong>课程:</strong><%= ma.course_message.course.name %> <%= User.current.lastname + User.current.firstname %>老师您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
</p>
<p>课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.term %>)</p> (<%= ma.course_message.course.term %>)</p>
<p><strong>作业标题:</strong><%= ma.course_message.name %></p> <p>作业标题:<span style="color:Red"><%= ma.course_message.name %></span></p>
<% unless ma.course_message.description.blank? %> <p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></p>
<div class="fl"><strong>作业内容:</strong></div> <p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;24点</span></p>
<div class="ml60"><%= ma.course_message.description.html_safe %></div> <p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></p>
<% end %> <p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p> <p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
<p><strong>匿评自动开始日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %></p>
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
<p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分</p>
<p> <p>
您可以修改作业内容、评分规则、匿评过程等,谢谢! 您可以修改作业内容、评分规则、匿评过程等,谢谢!
</p> </p>
@ -168,59 +163,62 @@
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li> <li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
<% if ma.viewed == 0 %> <li class="homepageHomeworkContent fl">
<li class="homepageHomeworkContent fl"> <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :onmouseover => "message_titile_show($(this),event)",
:onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %>
:onmouseout => "message_titile_hide($(this))" %> </li>
</li> <div style="display: none" class="message_title_red system_message_style">
<div style="display: none" class="message_title_red system_message_style"> <% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %> <p>
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p> <%= User.current.lastname + User.current.firstname %>同学您好!
<p><strong>课程:</strong><%= ma.course_message.course.name %> <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
(<%= ma.course_message.course.term %>)</p> </p>
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
<% unless ma.course_message.description.blank? %> <p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<div class="fl"><strong>作业内容:</strong></div>
<div class="ml60"><%= ma.course_message.description.html_safe %></div> <p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<% end %>
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p> <p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>@nbsp;&nbsp;24点</span></p>
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p> <p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>
<p> @nbsp;@nbsp;24点</span></p>
请同学们抓紧时间提交自己的作品,谢谢!
</p> <p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<% else %>
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p> <p>
<p><strong>课程:</strong><%= ma.course_message.course.name %> 请同学们抓紧时间提交自己的作品,谢谢!
(<%= ma.course_message.course.term %>)</p> </p>
<p><strong>作业标题:</strong><%= ma.course_message.name %></p> <% else %>
<% unless ma.course_message.description.blank? %> <p><%= User.current.lastname + User.current.firstname %>您好!
<div class="fl"><strong>作业内容:</strong></div> <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>
<div class="ml60"><%= ma.course_message.description.html_safe %></div> 老师发布的作业截止日期快到了:</p>
<% end %>
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p> <p><strong>课程名称:</strong><%= ma.course_message.course.name %>
<p><strong>匿评自动开始日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %></p> (<%= ma.course_message.course.term %>)</p>
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p> <p><strong>作业标题:</strong><%= ma.course_message.name %></p>
<p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分</p>
<p> <p><strong>提交截止:</strong><%= ma.course_message.end_time %>@nbsp;@nbsp;24点</p>
您可以修改作业内容、评分规则、匿评过程等,谢谢!
</p> <p><strong>匿评开始:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %>
<% end %> @nbsp;@nbsp;24点</p>
</div>
<li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp; 截止时间快到了!</li> <p><strong>匿评关闭:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %>
<% else %> @nbsp;@nbsp;24点</p>
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", <p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))"%> <p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分
</li> </p>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.course_message.name %> <p>
</div> 您可以修改作业内容、评分规则、匿评过程等,谢谢!
<% end %> </p>
<% end %>
</div>
<li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp; 截止时间快到了!</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>