作业消息修改,增加称呼、tips内容

This commit is contained in:
ouyangxuhua 2015-09-24 11:07:09 +08:00
parent 54065e49a7
commit 756664a3db
1 changed files with 61 additions and 4 deletions

View File

@ -176,7 +176,39 @@
: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">
<%= ma.course_message.name %> <% 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><strong>课程:</strong><%= ma.course_message.course.name %>
(<%= ma.course_message.course.term %>)</p>
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
<% unless ma.course_message.description.blank? %>
<div class="fl"><strong>作业内容:</strong></div>
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
<% 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>
<% else %>
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
<p><strong>课程:</strong><%= ma.course_message.course.name %>
(<%= ma.course_message.course.term %>)</p>
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
<% unless ma.course_message.description.blank? %>
<div class="fl"><strong>作业内容:</strong></div>
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
<% end %>
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></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>
<% end %>
</div> </div>
<li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp; 截止时间快到了!</li> <li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp; 截止时间快到了!</li>
<% else %> <% else %>
@ -304,7 +336,13 @@
<% if ma.course_message_type == "StudentWorksScore" %> <% if ma.course_message_type == "StudentWorksScore" %>
<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" %>"><%= ma.status == 0 ? "评阅了作品:" : "重新评阅了作品:" %></span></li> <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 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<% unless ma.content.nil? %> <% unless ma.content.nil? %>
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id), <%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
@ -313,6 +351,13 @@
: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" >
<%= ma.content.html_safe %> <%= ma.content.html_safe %>
<p><strong>课程:</strong><%= ma.course.name %>
(<%= ma.course.term %>)</p>
<p><strong>作业标题:</strong><%=ma.course_message.student_work.homework_common.name %></p>
<% unless ma.course_message.student_work.homework_common.description.blank? %>
<div class="fl"><strong>作业内容:</strong></div>
<div class="ml60"><%= ma.course_message.student_work.homework_common.description.html_safe %></div>
<% end %>
</div> </div>
<% end %> <% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
@ -344,7 +389,10 @@
<li class="homepageNewsPortrait 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> <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>
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, 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 +
"#{ma.course_message.user.members.where("course_id=?", ma.course.id).first.roles.first.name=='Student'?"同学":"老师"}",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
</li> </li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
@ -353,7 +401,16 @@
:onmouseout => "message_titile_hide($(this))" %></a> :onmouseout => "message_titile_hide($(this))" %></a>
</li> </li>
<div style="display: none" class="message_title_red system_message_style"> <div style="display: none" class="message_title_red system_message_style">
<%= ma.course_message.notes %> <div class="fl"><strong>回复内容:</strong></div>
<div class="ml60"><%= ma.course_message.notes %></div>
<div class="fl"><strong>您的作品评论:</strong></div>
<div class="ml80"><%= ma.course_message.jour.comment %></div>
<p><strong>课程:</strong><%= ma.course.name %>(<%= ma.course.term %>)</p>
<p><strong>作业标题:</strong><%=ma.course_message.jour.student_work.homework_common.name %></p>
<% unless ma.course_message.jour.student_work.homework_common.description.blank? %>
<div class="fl"><strong>作业内容:</strong></div>
<div class="ml60"><%= ma.course_message.jour.student_work.homework_common.description.html_safe %></div>
<% end %>
</div> </div>
<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>