2015-09-28 16:14:53 +08:00
|
|
|
|
<% if ma.class == CourseMessage %>
|
|
|
|
|
<% if ma.course_message_type == "News" %>
|
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %></a></li>
|
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li>
|
|
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
|
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
|
|
|
|
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<p><strong>标题:</strong><%= ma.course_message.title %></p>
|
|
|
|
|
<% unless ma.course_message.description.nil? %>
|
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
|
<div class="ml36"><%= ma.course_message.description.html_safe %></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if ma.course_message_type == "Comment" %>
|
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
|
|
|
|
|
<li class="homepageNewsContent fl">
|
2015-09-29 15:15:00 +08:00
|
|
|
|
<%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
|
2015-09-28 16:14:53 +08:00
|
|
|
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-29 15:15:00 +08:00
|
|
|
|
<p><strong>评论对象:</strong><%= ma.course_message.commented.title %></p>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<% unless ma.course_message.comments.nil? %>
|
2015-09-29 15:15:00 +08:00
|
|
|
|
<div class="fl"><strong>评论内容:</strong></div>
|
|
|
|
|
<div class="ml60"><%= ma.course_message.comments.html_safe %></div>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
2015-10-22 15:41:52 +08:00
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil?%>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<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="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" %>">发布了课程作业:</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-10-19 18:19:27 +08:00
|
|
|
|
<% if !User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil? %>
|
2015-10-23 09:33:16 +08:00
|
|
|
|
<%= link_to "作业题目:" + ma.course_message.name, new_student_work_path(:homework => ma.course_message.id),
|
2015-10-19 18:19:27 +08:00
|
|
|
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
|
|
|
|
<% else %>
|
2015-10-23 09:33:16 +08:00
|
|
|
|
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
2015-10-19 18:19:27 +08:00
|
|
|
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a></li>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<% if User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
|
|
|
|
|
<p>
|
|
|
|
|
<%= User.current.lastname + User.current.firstname %>老师您好!
|
2015-10-19 16:59:08 +08:00
|
|
|
|
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.show_name + "老师")%>刚刚发布了一个作业:
|
2015-09-28 16:14:53 +08:00
|
|
|
|
</p>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<ul class="ul_normal_color">
|
|
|
|
|
<li>课程名称:<%= ma.course_message.course.name %>
|
|
|
|
|
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
|
|
|
|
<li>作业标题:<span style="color:Red"><%= ma.course_message.name %></span></li>
|
|
|
|
|
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></li>
|
|
|
|
|
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 24点</span></li>
|
|
|
|
|
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></li>
|
|
|
|
|
<li>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></li>
|
|
|
|
|
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
|
|
|
|
|
</ul>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<p>
|
|
|
|
|
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
|
|
|
|
</p>
|
|
|
|
|
<% else %>
|
2015-10-19 16:59:08 +08:00
|
|
|
|
<p><%= User.current.lastname + User.current.firstname %>同学您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:</p>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<ul class="ul_normal_color">
|
|
|
|
|
<li>课程名称:<%= ma.course_message.course.name %>
|
|
|
|
|
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
|
|
|
|
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
|
|
|
|
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></li>
|
|
|
|
|
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 24点</span></li>
|
|
|
|
|
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></li>
|
|
|
|
|
<li>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></li>
|
|
|
|
|
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
|
|
|
|
|
</ul>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<p>
|
2015-10-23 09:33:16 +08:00
|
|
|
|
请抓紧时间提交您的作品,谢谢!
|
2015-09-28 16:14:53 +08:00
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
|
|
|
|
|
<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>
|
2015-10-12 16:46:40 +08:00
|
|
|
|
<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", :title => "#{ma.course_message.user.lastname + ma.course_message.user.firstname}老师" %>
|
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<li class="homepageHomeworkContent fl">
|
2015-10-23 09:33:16 +08:00
|
|
|
|
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
2015-09-28 16:14:53 +08:00
|
|
|
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-09-28 16:42:20 +08:00
|
|
|
|
<% if !User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<p>
|
|
|
|
|
<%= User.current.lastname + User.current.firstname %>同学您好!
|
|
|
|
|
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
|
|
|
|
|
</p>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<ul class="ul_normal_color">
|
|
|
|
|
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
|
|
|
|
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
|
|
|
|
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></li>
|
|
|
|
|
<li>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 24点</span></li>
|
|
|
|
|
<li>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></li>
|
|
|
|
|
<li>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></li>
|
|
|
|
|
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
|
|
|
|
|
<p>请抓紧时间提交您的作品,谢谢!</p>
|
|
|
|
|
</ul>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</li>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!--作品开启匿评 待整合:时间紧-->
|
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
|
|
|
|
|
<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="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" %>">启动了作业匿评:</span>
|
|
|
|
|
</li>
|
|
|
|
|
<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"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<p>
|
2015-09-28 16:42:20 +08:00
|
|
|
|
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师' : '同学' %>您好!
|
2015-09-29 14:16:27 +08:00
|
|
|
|
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>开启了匿评,作业详情如下:
|
2015-09-28 16:14:53 +08:00
|
|
|
|
</p>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<ul class="ul_normal_color">
|
|
|
|
|
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
|
|
|
|
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
|
|
|
|
<li>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></li>
|
|
|
|
|
<li>匿评截止:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></li>
|
|
|
|
|
</ul>
|
2015-10-15 10:59:18 +08:00
|
|
|
|
<% unless User.current.allowed_to?(:as_teacher, ma.course_message.course)%>
|
2015-10-24 15:27:27 +08:00
|
|
|
|
<p>请您尽早完成匿评!如果您在截止日期前未完成匿评,您的最终成绩将被扣除<%= ma.course_message.homework_detail_manual.absence_penalty %>分乘以缺评份数。</p>
|
|
|
|
|
<p>例如,您缺评了两份作品,则您的最终成绩将被扣除 <%= ma.course_message.homework_detail_manual.absence_penalty %> * 2 = <%= ma.course_message.homework_detail_manual.absence_penalty * 2 %>分</p>
|
2015-10-15 10:59:18 +08:00
|
|
|
|
<% end%>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!--作品关闭匿评-->
|
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
|
|
|
|
|
<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="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" %>">关闭了作业匿评:</span></li>
|
|
|
|
|
<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"}",
|
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))"%>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<p>
|
2015-09-28 16:42:20 +08:00
|
|
|
|
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
|
2015-09-29 14:16:27 +08:00
|
|
|
|
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>关闭了匿评,作业详情如下:
|
2015-09-28 16:14:53 +08:00
|
|
|
|
</p>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<ul class="ul_grey">
|
|
|
|
|
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)</li>
|
|
|
|
|
<li>作业标题:<%= ma.course_message.name %></li>
|
|
|
|
|
</ul>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %>
|
|
|
|
|
<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="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" %>">启动作业匿评失败</span>
|
|
|
|
|
</li>
|
|
|
|
|
<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"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<p>
|
|
|
|
|
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher, ma.course_message.course) ? '老师':'同学'%>您好!
|
2015-10-15 10:59:18 +08:00
|
|
|
|
<%= User.current.eql?(ma.course_message.user) ?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname + "老师") %>启动作业匿评失败!
|
2015-10-23 14:28:24 +08:00
|
|
|
|
|
2015-10-15 10:59:18 +08:00
|
|
|
|
</p>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<ul class="ul_normal_color">
|
|
|
|
|
<li>失败原因:<span style="color:red;">提交作品的人数低于2人</span></li>
|
|
|
|
|
<li>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年' + ma.course_message.course.term %>)</li>
|
|
|
|
|
<li>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></li>
|
|
|
|
|
<li>提交截止:<span style="color:Red;"><%= ma.course_message.end_time%> 24点</span></li>
|
|
|
|
|
</ul>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% if ma.course_message_type == "Poll" %>
|
|
|
|
|
<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="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="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
|
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
|
|
|
|
|
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<%= ma.course_message.polls_name %>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if ma.course_message_type == "Message" %>
|
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
|
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %></span></li>
|
|
|
|
|
<% if ma.course_message.parent_id.nil? %>
|
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
|
<%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
|
|
|
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style" >
|
|
|
|
|
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
|
|
|
|
|
<% unless ma.course_message.content.nil? %>
|
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
|
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
|
<%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
|
|
|
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style" >
|
|
|
|
|
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
|
|
|
|
|
<% unless ma.course_message.content.nil? %>
|
|
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
|
|
|
|
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if ma.course_message_type == "StudentWorksScore" %>
|
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
|
<% if ma.course_message.reviewer_role == 3 %>
|
|
|
|
|
<%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
|
<% if ma.course_message.reviewer_role == 3 %>
|
|
|
|
|
<span class="newsBlue homepageNewsPublisher">匿名用户</span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
|
|
|
|
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<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">
|
|
|
|
|
<% unless ma.content.nil? %>
|
|
|
|
|
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
|
|
|
|
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover =>"message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style" >
|
2015-10-20 09:42:26 +08:00
|
|
|
|
<p>
|
|
|
|
|
<%= User.current.show_name %>同学您好!
|
|
|
|
|
<%= ma.course_message.reviewer_role == 3? "匿名用户" : (ma.course_message.user.show_name + "老师")%><%= ma.status == 0? "评阅了您的作品":"重新评阅了您的作品"%>。详情如下:
|
|
|
|
|
</p>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<ul class="ul_normal_color">
|
|
|
|
|
<li>课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)</li>
|
|
|
|
|
<li>作业标题:<span style="color:Red;"><%=ma.course_message.student_work.homework_common.name %></span></li>
|
|
|
|
|
<% content = ma.content.gsub("作业评分:","").split(" 评语:")%>
|
|
|
|
|
<li>作品评分:<span style="color:Red;"><%= content[0] %>分</span></li>
|
|
|
|
|
<% if content.size > 1 %>
|
2015-10-27 09:29:54 +08:00
|
|
|
|
<div class="fl" style="width:74px;"><li>作品评语:</li></div>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<div style="margin-left:74px"><span style="color:Red;"><%= content[1] %></span></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
2015-10-14 17:28:13 +08:00
|
|
|
|
<p>
|
2015-10-23 09:33:16 +08:00
|
|
|
|
本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %> 24点结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。 期待您取得更大的进步!
|
2015-10-14 17:28:13 +08:00
|
|
|
|
</p>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if ma.course_message_type == "JournalsForMessage" %>
|
|
|
|
|
<% if ma.course_message.jour_type == 'Course' %>
|
|
|
|
|
<% if params[:type] != 'homework' %>
|
|
|
|
|
<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="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="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
|
<%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
|
|
|
|
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<%= ma.course_message.notes.html_safe %>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<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="homepageNewsPubType fl">
|
|
|
|
|
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
|
2015-10-23 14:28:24 +08:00
|
|
|
|
"#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}",
|
2015-09-28 16:14:53 +08:00
|
|
|
|
user_path(ma.course_message.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 ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-10-20 09:42:26 +08:00
|
|
|
|
<p>
|
|
|
|
|
<%= User.current.show_name %>老师您好!
|
2015-10-23 16:28:22 +08:00
|
|
|
|
<%= ma.course_message.user.show_name%><%= ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"%>回复了您的作品评论。详情如下:
|
2015-10-20 09:42:26 +08:00
|
|
|
|
</p>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<ul class="ul_normal_color">
|
|
|
|
|
<li>回复内容:<span style="color:red;"><%= ma.course_message.notes %></span></li>
|
|
|
|
|
<li>您的评论:<span style="color:red;"><%= ma.course_message.jour.comment %></span></li>
|
|
|
|
|
<li>课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)</li>
|
|
|
|
|
<li>作业标题:<span style="color:Red;"><%=ma.course_message.jour.student_work.homework_common.name %></span></li>
|
|
|
|
|
</ul>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
2015-10-19 15:45:24 +08:00
|
|
|
|
<!-- 作业迟交,不能参与匿评提醒消息 -->
|
2015-10-20 16:19:32 +08:00
|
|
|
|
<% if ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? %>
|
2015-10-19 15:45:24 +08:00
|
|
|
|
<ul class="homepageNewsList fl">
|
2015-10-23 09:33:16 +08:00
|
|
|
|
<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>
|
2015-10-19 15:45:24 +08:00
|
|
|
|
<li class="homepageNewsPubType fl">
|
2015-10-23 09:33:16 +08:00
|
|
|
|
<%=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>
|
2015-10-19 15:45:24 +08:00
|
|
|
|
</li>
|
2015-10-23 09:33:16 +08:00
|
|
|
|
<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),
|
2015-10-19 15:45:24 +08:00
|
|
|
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
2015-10-20 16:19:32 +08:00
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
|
|
|
|
</li>
|
2015-10-19 15:45:24 +08:00
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<p>
|
|
|
|
|
<%= User.current.lastname + User.current.firstname %>
|
2015-10-20 16:19:32 +08:00
|
|
|
|
<%= User.current.allowed_to?(:as_teacher,ma.course_message.homework_common.course) ? '老师':'同学'%>您好!由于迟交作业,您及您的作品都不能参与以下作业的匿评。作业详情如下:
|
2015-10-19 15:45:24 +08:00
|
|
|
|
</p>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<ul class="ul_grey">
|
|
|
|
|
<li>课程名称:<%= 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>作业标题:<%= ma.course_message.homework_common.name %></li>
|
|
|
|
|
<li>提交截止:<%= ma.course_message.homework_common.end_time %> 24:00</li>
|
|
|
|
|
<li>提交时间:<%= format_time(ma.course_message.created_at) %></li>
|
|
|
|
|
<li>迟交扣分:<%= ma.course_message.homework_common.late_penalty %>分</li>
|
2015-10-23 09:33:16 +08:00
|
|
|
|
</ul>
|
|
|
|
|
<p>如需获得最终成绩,请您联系主讲老师对您的作品进行单独评分!</p>
|
2015-10-19 15:45:24 +08:00
|
|
|
|
</div>
|
2015-10-23 09:33:16 +08:00
|
|
|
|
<li class="homepageHomeworkContentWarn fl"> 您迟交了作品!</li>
|
2015-10-19 15:45:24 +08:00
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!-- 创建课程消息 -->
|
|
|
|
|
<% if ma.course_message_type == "Course" %>
|
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"></a></li>
|
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
|
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您成功创建了课程:</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-10-19 16:59:08 +08:00
|
|
|
|
<%= link_to "课程名称:" + ma.course_message.name, course_path(ma.course_message),
|
2015-10-19 15:45:24 +08:00
|
|
|
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<p>
|
|
|
|
|
<%= User.current.lastname + User.current.firstname %>老师您好!您成功创建了一个课程,详情如下:
|
|
|
|
|
</p>
|
|
|
|
|
<p>课程名称:<%= ma.course_message.name %></p>
|
2015-10-19 16:59:08 +08:00
|
|
|
|
<p>开课学期:<%= ma.course_message.time.to_s + '年' + ma.course_message.term %></p>
|
2015-10-29 10:50:19 +08:00
|
|
|
|
<p>课程ID:<span style="color:red;"><%= ma.course_message.id %></span></p>
|
|
|
|
|
<p>课程密码:<span style="color:red;"><%= ma.course_message.password %></span></p>
|
|
|
|
|
<p>学时总数:<%= ma.course_message.class_period %></p>
|
2015-10-19 15:45:24 +08:00
|
|
|
|
<p>创建时间:<%= format_time(ma.course_message.created_at) %></p>
|
2015-10-29 10:50:19 +08:00
|
|
|
|
<p>您可以点击左上角的“配置”按钮,修改课程基本信息,添加及删除课程成员。您也可以把课程ID及密码告诉学生和其他成员,让他们输入ID及密码加入课程。</p>
|
|
|
|
|
<% if ma.course_message.is_public %>
|
|
|
|
|
<p>您的课程是公开的,所有人都能访问您的课程。若不想设置为公开,您可以在配置中设置。</p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<p>您的课程是私有的,非课程成员不能访问您的课程。如果想设置为公开,您可以在配置中设置。</p>
|
|
|
|
|
<% end %>
|
2015-10-19 15:45:24 +08:00
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
2015-10-21 14:52:00 +08:00
|
|
|
|
<% if ma.course_message_type == "JoinCourseRequest" %>
|
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"></a></li>
|
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
|
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的课程成员申请:</span>
|
|
|
|
|
</li>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-10-26 14:15:23 +08:00
|
|
|
|
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
|
2015-10-21 14:52:00 +08:00
|
|
|
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
2015-10-23 14:28:24 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<p>
|
|
|
|
|
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下:
|
|
|
|
|
</p>
|
|
|
|
|
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
|
|
|
|
|
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
|
|
|
|
|
<div class="fl">课程描述:</div>
|
|
|
|
|
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe %></div>
|
|
|
|
|
<p>申请职位:<%= ma.content == '9' ? "教师" : "教辅"%></p>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageHomeworkContentWarn fl">
|
2015-10-21 14:52:00 +08:00
|
|
|
|
<span id="deal_info_<%=ma.id%>">
|
|
|
|
|
<% if ma.status == 0 || ma.status.nil?%>
|
|
|
|
|
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true'%>
|
|
|
|
|
|
|
2015-10-23 14:28:24 +08:00
|
|
|
|
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true'%>
|
2015-10-21 14:52:00 +08:00
|
|
|
|
<% elsif ma.status == 1%> <!-- 同意 -->
|
|
|
|
|
您已经同意了该申请
|
|
|
|
|
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
|
|
|
|
您已经拒绝了该申请
|
|
|
|
|
<%end %>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if ma.course_message_type == "CourseRequestDealResult" %>
|
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"></a></li>
|
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
|
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
|
|
|
|
课程申请进度反馈:</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
|
<%= link_to ma.status == 1 ?
|
|
|
|
|
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过'
|
|
|
|
|
:
|
|
|
|
|
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝', course_path(Course.find(ma.course_id)),
|
|
|
|
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<p>
|
|
|
|
|
<%= User.current.lastname + User.current.firstname %>老师您好!您已成功加入课程<%= Course.find(ma.course_id).name%>。
|
|
|
|
|
</p>
|
|
|
|
|
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
|
|
|
|
|
<div class="fl">课程描述:</div>
|
|
|
|
|
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe %></div>
|
|
|
|
|
<p>申请职位:<%= ma.content == '9' ? "教师" : "教辅"%></p>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
2015-10-29 09:52:59 +08:00
|
|
|
|
|
|
|
|
|
<!--被老师拉入课程-->
|
2015-10-29 15:38:57 +08:00
|
|
|
|
<% if ma.course_message_type == "JoinCourse" and ma.status == 0 %>
|
2015-10-29 09:52:59 +08:00
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id) %></a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
|
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :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 ma.course.name, course_member_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
|
2015-10-29 15:38:57 +08:00
|
|
|
|
<% teacher = User.find(ma.course_message_id) %>
|
|
|
|
|
<p><%= teacher.show_name %>(<%= teacher %>)老师把您加入了课程,详情如下:</p>
|
|
|
|
|
<p>课程名称:<%= ma.course.name %></p>
|
|
|
|
|
<p>开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %></p>
|
|
|
|
|
<p>课程ID:<%= ma.course.id %></p>
|
|
|
|
|
<p>课时总数:<%= ma.course.class_period %></p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<p>
|
|
|
|
|
您已经被移出该私有课程,非课程成员没有权限访问私有课程
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<!--被老师拉入课程-->
|
|
|
|
|
<% if ma.course_message_type == "JoinCourse" and ma.status == 1 %>
|
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
|
<a href="javascript:void(0);"></a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
|
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">您增加了新的课程成员:</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2015-10-30 17:32:50 +08:00
|
|
|
|
<%= link_to User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")", user_path(ma.course_message_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
2015-10-29 15:38:57 +08:00
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
|
|
|
|
|
<p>您增加了新的课程成员,详情如下:</p>
|
2015-10-30 17:32:50 +08:00
|
|
|
|
<p>成员:<%= User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")" %></p>
|
2015-10-29 15:38:57 +08:00
|
|
|
|
<p>课程名称:<%= ma.course.name %></p>
|
|
|
|
|
<p>开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %></p>
|
|
|
|
|
<p>课程ID:<%= ma.course.id %></p>
|
2015-10-29 09:52:59 +08:00
|
|
|
|
<p>课时总数:<%= ma.course.class_period %></p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<p>
|
|
|
|
|
您已经被移出该私有课程,非课程成员没有权限访问私有课程
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<!-被老师移出课程-->
|
|
|
|
|
<% if ma.course_message_type == "RemoveFromCourse" %>
|
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.course_message_id)), :width => "30", :height => "30"), user_path(ma.course_message_id) %></a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
|
<%=link_to User.find(ma.course_message_id), user_path(User.find(ma.course_message_id)), :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 ma.course.name, member_course_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
|
|
|
|
:onmouseover => "message_titile_show($(this),event)",
|
|
|
|
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
|
|
|
|
</li>
|
|
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
|
|
|
|
<% if ma.course.is_public? || User.current.member_of?(ma.course) || User.current.admin? %>
|
2015-10-29 15:38:57 +08:00
|
|
|
|
<p>您已被<%= User.find(ma.course_message_id).show_name %>老师移出了课程,详情如下:</p>
|
|
|
|
|
<p>课程名称:<%= ma.course.name %></p>
|
|
|
|
|
<p>开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %></p>
|
|
|
|
|
<% if !ma.content.nil? %>
|
|
|
|
|
<p>担任角色:<%= ma.content %></p>
|
|
|
|
|
<% end %>
|
2015-10-29 09:52:59 +08:00
|
|
|
|
<p>学时总数:<%= ma.course.class_period %></p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<p>
|
|
|
|
|
您已经被移出该私有课程,非课程成员没有权限访问私有课程
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
2015-09-28 16:14:53 +08:00
|
|
|
|
<% end %>
|