修改作业消息的内容及样式

This commit is contained in:
ouyangxuhua 2015-10-23 09:33:16 +08:00
parent 41b7b2df3b
commit 7845a0e712
2 changed files with 31 additions and 20 deletions

View File

@ -45,12 +45,12 @@
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<% if !User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil? %>
<%= link_to ma.course_message.name, new_student_work_path(:homework => ma.course_message.id),
<%= link_to "作业题目:" + ma.course_message.name, new_student_work_path(:homework => ma.course_message.id),
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
<% else %>
<%= 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"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
@ -79,10 +79,12 @@
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></p>
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
<p>
请抓紧时间提交自己的作品,谢谢!
请抓紧时间提交的作品,谢谢!
</p>
<% end %>
</div>
@ -96,7 +98,7 @@
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :title => "#{ma.course_message.user.lastname + ma.course_message.user.firstname}老师" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
<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"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
@ -110,9 +112,11 @@
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></p>
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>请同学们抓紧时间提交自己的作品,谢谢!</p>
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
<p>请抓紧时间提交您的作品,谢谢!</p>
<% else %>
<p><%= 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.time.to_s + '年'+ ma.course_message.course.term %>)</p>
@ -304,17 +308,14 @@
<p>作业标题:<span style="color:Red;"><%=ma.course_message.student_work.homework_common.name %></span></p>
<% content = ma.content.gsub("作业评分:","").split("&nbsp;&nbsp;&nbsp; 评语:")%>
<p>
作品评分:<%= content[0] %>
作品评分:<span style="color:Red;"><%= content[0] %>分</span>
</p>
<% if content.size > 1 %>
<div class="fl">作品评语:</div>
<div class="ml60"><%= content[1] %></div>
<div class="ml60"><span style="color:Red;"><%= content[1] %></span></div>
<% end %>
<p>
本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点结束匿评到时您将可以看到所有其他同学的作品啦大家可以进一步互相学习。
</p>
<p>
期待您取得更大的进步!
本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点结束匿评到时您将可以看到所有其他同学的作品啦大家可以进一步互相学习。 期待您取得更大的进步!
</p>
</div>
<% end %>
@ -350,7 +351,7 @@
</li>
<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'?"同学":"老师"}",
"#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"同学":"老师"}",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
</li>
@ -378,12 +379,13 @@
<!-- 作业迟交,不能参与匿评提醒消息 -->
<% if ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"></a></li>
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.homework_common.user), :width => "30", :height => "30"), user_path(ma.course_message.homework_common.user) %></a></li>
<li class="homepageNewsPubType fl">
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">迟交作业,不能参与作业匿评!</span>
<%=link_to ma.course_message.homework_common.user.show_name, user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to "由于迟交作业,您及您的作品都不能参与作业的匿评", student_work_index_path(:homework => ma.course_message.homework_common_id),
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to "作业题目:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
@ -393,11 +395,18 @@
<%= User.current.lastname + User.current.firstname %>
<%= User.current.allowed_to?(:as_teacher,ma.course_message.homework_common.course) ? '老师':'同学'%>您好!由于迟交作业,您及您的作品都不能参与以下作业的匿评。作业详情如下:
</p>
<p>课程名称:<%= ma.course_message.homework_common.course.name %>(<%= ma.course_message.homework_common.course.time.to_s + '年' + ma.course_message.homework_common.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%=ma.course_message.homework_common.name %></span></p>
<p>提交截止:<span style="color:Red;"><%=ma.course_message.homework_common.end_time %>&nbsp;24:00</span></p>
<p>提交时间:<span style="color:Red;"><%=format_time(ma.course_message.created_at) %></span></p>
<ul style="margin-left:7px;">
<li style="list-style-type:disc;margin-left:5px">
课程名称:<%= ma.course_message.homework_common.course.name %>(<%= ma.course_message.homework_common.course.time.to_s + '年' + ma.course_message.homework_common.course.term %>)
</li>
<li style="list-style-type:disc;margin-left:5px">作业标题:<%= ma.course_message.homework_common.name %></li>
<li style="list-style-type:disc;margin-left:5px">提交截止:<%= ma.course_message.homework_common.end_time %>&nbsp;24:00</li>
<li style="list-style-type:disc;margin-left:5px">提交时间:<%= format_time(ma.course_message.created_at) %></li>
<li style="list-style-type:disc;margin-left:5px">迟交扣分:<%= ma.course_message.homework_common.late_penalty %>分</li>
</ul>
<p>如需获得最终成绩,请您联系主讲老师对您的作品进行单独评分!</p>
</div>
<li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp;您迟交了作品!</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>

View File

@ -1296,3 +1296,5 @@ a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; c
.list_style ol li{list-style-type: decimal;margin-left: 20px;}
.list_style ul li{list-style-type: disc;margin-left: 20px;}
.list_style_disc {list-style-type:disc;margin-left:5px;}
.system_message_style li{color:#909090}