% if ma.class == CourseMessage %>
<% if ma.course_message_type == "News" %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %>
- <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">发布了通知:
-
<%= 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))" %>
标题:<%= ma.course_message.title %>
<% unless ma.course_message.description.nil? %>
内容:
<%= ma.course_message.description.html_safe %>
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "Comment" %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
- <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">评论了通知:
-
<%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
评论对象:<%= ma.course_message.commented.title %>
<% unless ma.course_message.comments.nil? %>
评论内容:
<%= ma.course_message.comments.html_safe %>
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil?%>
- <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
- <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
">发布了课程作业:
-
<% 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),
: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),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
<% end %>
<% if User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
<%= User.current.lastname + User.current.firstname %>老师您好!
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.show_name + "老师")%>刚刚发布了一个作业:
- 课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
- 作业标题:<%= ma.course_message.name %>
- 提交截止:<%= ma.course_message.end_time %> 24点
- 匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
- 匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
- 迟交扣分:<%= ma.course_message.late_penalty %>分
- 缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
您可以修改作业内容、评分规则、匿评过程等,谢谢!
<% else %>
<%= User.current.lastname + User.current.firstname %>同学您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
- 课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
- 作业标题:<%= ma.course_message.name %>
- 提交截止:<%= ma.course_message.end_time %> 24点
- 匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
- 匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
- 迟交扣分:<%= ma.course_message.late_penalty %>分
- 缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
请抓紧时间提交您的作品,谢谢!
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
- <%=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}老师" %>
">发布的作业:
-
<%= 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))" %>
<% if !User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
<%= User.current.lastname + User.current.firstname %>同学您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
- 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
- 作业标题:<%= ma.course_message.name %>
- 提交截止:<%= ma.course_message.end_time %> 24点
- 匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
- 匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
- 迟交扣分:<%= ma.course_message.late_penalty %>分
- 缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
请抓紧时间提交您的作品,谢谢!
<% end %>
- 截止时间快到了!
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
-
<%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
-
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
">启动了作业匿评:
-
<%= 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))" %>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师' : '同学' %>您好!
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>开启了匿评,作业详情如下:
- 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
- 作业标题:<%= ma.course_message.name %>
- 缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
- 匿评截止:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
<% unless User.current.allowed_to?(:as_teacher, ma.course_message.course)%>
请您尽早完成匿评!如果您在截止日期前未完成匿评,您的最终成绩将被扣除<%= ma.course_message.homework_detail_manual.absence_penalty %>分乘以缺评份数。
例如,您缺评了两份作品,则您的最终成绩将被扣除 <%= ma.course_message.homework_detail_manual.absence_penalty %> * 2 = <%= ma.course_message.homework_detail_manual.absence_penalty * 2 %>分
<% end%>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
-
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">关闭了作业匿评:
-
<%= 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))"%>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>关闭了匿评,作业详情如下:
- 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
- 作业标题:<%= ma.course_message.name %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %>
-
<%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
-
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
">启动作业匿评失败
-
<%= 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))" %>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher, ma.course_message.course) ? '老师':'同学'%>您好!
<%= User.current.eql?(ma.course_message.user) ?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname + "老师") %>启动作业匿评失败!
- 失败原因:提交作品的人数低于2人
- 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年' + ma.course_message.course.term %>)
- 作业标题:<%= ma.course_message.name %>
- 提交截止:<%= ma.course_message.end_time%> 24点
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "Poll" %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
- <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %>
<% if ma.course_message.parent_id.nil? %>
-
<%= 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))" %>
主题:<%= ma.course_message.subject %>
<% unless ma.course_message.content.nil? %>
内容:
<%= ma.course_message.content.html_safe %>
<% end %>
<% else %>
-
<%= 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))" %>
主题:<%= ma.course_message.subject %>
<% unless ma.course_message.content.nil? %>
内容:
<%= ma.course_message.content.html_safe %>
<% end %>
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "StudentWorksScore" %>
-
<% 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 %>
-
<% if ma.course_message.reviewer_role == 3 %>
匿名用户
<% else %>
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<% end %>
">
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
-
<% 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))" %>
<%= User.current.show_name %>同学您好!
<%= ma.course_message.reviewer_role == 3? "匿名用户" : (ma.course_message.user.show_name + "老师")%><%= ma.status == 0? "评阅了您的作品":"重新评阅了您的作品"%>。详情如下:
- 课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)
- 作业标题:<%=ma.course_message.student_work.homework_common.name %>
<% content = ma.content.gsub("作业评分:","").split(" 评语:")%>
- 作品评分:<%= content[0] %>分
<% if content.size > 1 %>
- 作品评语:
<%= content[1] %>
<% end %>
本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %> 24点结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。 期待您取得更大的进步!
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "JournalsForMessage" %>
<% if ma.course_message.jour_type == 'Course' %>
<% if params[:type] != 'homework' %>
-
<%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
-
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
"#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
">回复了作品评论:
-
<%= 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))" %>
<%= User.current.show_name %>老师您好!
<%= ma.course_message.user.show_name%><%= ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"%>回复了您的作品评论。详情如下:
- 回复内容:<%= ma.course_message.notes %>
- 您的评论:<%= ma.course_message.jour.comment %>
- 课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)
- 作业标题:<%=ma.course_message.jour.student_work.homework_common.name %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% end %>
<% if ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? %>
- <%= 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) %>
-
<%=link_to ma.course_message.homework_common.user.show_name, user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher" %>
">发布的作业:
-
<%= 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))" %>
<%= User.current.lastname + User.current.firstname %>
<%= User.current.allowed_to?(:as_teacher,ma.course_message.homework_common.course) ? '老师':'同学'%>您好!由于迟交作业,您及您的作品都不能参与以下作业的匿评。作业详情如下:
- 课程名称:<%= ma.course_message.homework_common.course.name %>(<%= ma.course_message.homework_common.course.time.to_s + '年' + ma.course_message.homework_common.course.term %>)
- 作业标题:<%= ma.course_message.homework_common.name %>
- 提交截止:<%= ma.course_message.homework_common.end_time %> 24:00
- 提交时间:<%= format_time(ma.course_message.created_at) %>
- 迟交扣分:<%= ma.course_message.homework_common.late_penalty %>分
如需获得最终成绩,请您联系主讲老师对您的作品进行单独评分!
- 您迟交了作品!
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "Course" %>
-
系统提示
">您成功创建了课程:
-
<%= link_to "课程名称:" + ma.course_message.name, course_path(ma.course_message),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
<%= User.current.lastname + User.current.firstname %>老师您好!您成功创建了一个课程,详情如下:
课程名称:<%= ma.course_message.name %>
开课学期:<%= ma.course_message.time.to_s + '年' + ma.course_message.term %>
课程描述:
<%= ma.course_message.description.html_safe %>
学时总数:<%= ma.course_message.class_period%>
创建时间:<%= format_time(ma.course_message.created_at) %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "JoinCourseRequest" %>
-
系统提示
">您有了新的课程成员申请:
-
<%= 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),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下:
真实姓名:<%= User.find(ma.course_message_id).realname %>
申请课程:<%= Course.find(ma.course_id).name%>
课程描述:
<%= Course.find(ma.course_id).description.html_safe %>
申请职位:<%= ma.content == '9' ? "教师" : "教辅"%>
-
<% if ma.status == 0 || ma.status.nil?%>
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true'%>
|
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true'%>
<% elsif ma.status == 1%>
您已经同意了该申请
<% elsif ma.status == 2%>
您已经拒绝了该申请
<%end %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "CourseRequestDealResult" %>
<% end %>
<% end %>