1.加入课程申请发送邮件;

2.解决360浏览器不能正确显示“重新评阅了作品”消息的问题
This commit is contained in:
ouyangxuhua 2015-10-27 09:29:54 +08:00
parent fc70c8bfab
commit f5a498a595
2 changed files with 3 additions and 1 deletions

View File

@ -317,6 +317,7 @@ class CoursesService
elsif current_user.allowed_to?(:as_teacher,course)
@state = 3
else
Mailer.run.join_course_request(course, User.current, params[:role])
#如果加入角色为教师或者教辅
CourseMessage.create(:user_id => course.tea_id, :course_id => course.id, :viewed => false,:content=> params[:role],:course_message_id=>User.current.id,:course_message_type=>'JoinCourseRequest',:status=>0)
@state = 6
@ -337,6 +338,7 @@ class CoursesService
if CourseMessage.where("course_message_type = 'JoinCourseRequest' and user_id = #{course.tea_id} and content = #{params[:role]} and course_message_id = #{User.current.id} and course_id = #{course.id} and status = 0").count != 0
@state = 7
else
Mailer.run.join_course_request(course, User.current, params[:role])
CourseMessage.create(:user_id => course.tea_id, :course_id => course.id, :viewed => false,:content=> params[:role],:course_message_id=>User.current.id,:course_message_type=>'JoinCourseRequest',:status=>0)
@state = 6
end

View File

@ -309,7 +309,7 @@
<% content = ma.content.gsub("作业评分:","").split("&nbsp;&nbsp;&nbsp; 评语:")%>
<li>作品评分:<span style="color:Red;"><%= content[0] %>分</span></li>
<% if content.size > 1 %>
<div class="fl"><li>作品评语:</li></div>
<div class="fl" style="width:74px;"><li>作品评语:</li></div>
<div style="margin-left:74px"><span style="color:Red;"><%= content[1] %></span></div>
<% end %>
</ul>