parent
fc70c8bfab
commit
f5a498a595
|
@ -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
|
||||
|
|
|
@ -309,7 +309,7 @@
|
|||
<% content = ma.content.gsub("作业评分:","").split(" 评语:")%>
|
||||
<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>
|
||||
|
|
Loading…
Reference in New Issue