<% if ma.class == CourseMessage %> <% if ma.course_message_type == "News" && ma.course_message %> <% end %> <% if ma.course_message_type == "Comment" && ma.course_message %> <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? && ma.course_message %> <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 && ma.course_message %> <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 && ma.course_message %> <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 && ma.course_message %> <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 && ma.course_message %> <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 %> <% end %> <% if ma.course_message_type == "ApplyResource" && ma.status == 0 && ma.course_message %> <% end %> <% if ma.course_message_type == "ApplyResource" && ma.status == 1 && ma.course_message %> <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 6 && ma.course_message %> <% end %> <% if ma.course_message_type == "Poll" && ma.course_message %> <% end %> <% if ma.course_message_type == "Message" && !ma.nil? && !ma.course_message.nil? %> <% end %> <% if ma.course_message_type == "StudentWorksScore" && ma.course_message %> <% end %> <% if ma.course_message_type == "JournalsForMessage" && ma.course_message %> <% if ma.course_message.jour_type == 'Course' %> <% if params[:type] != 'homework' %> <% end %> <% elsif ma.course_message.jour_type == 'HomeworkCommon' %> <% else %> <% end %> <% end %> <% if ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) && ma.course_message %> <% end %> <% if ma.course_message_type == "StudentWork" && ma.status == 1 && ma.course_message %> <% end %> <% if ma.course_message_type == "StudentWork" && ma.status == 2 && ma.course_message %> <% end %> <% if ma.course_message_type == "Course" && ma.course_message %> <% end %> <% if ma.course_message_type == "JoinCourseRequest" && !ma.nil? %> <% end %> <% if ma.course_message_type == "CourseRequestDealResult" %> <% end %> <% if ma.course_message_type == "JoinCourse" and ma.status == 0 %> <% end %> <% if ma.course_message_type == "JoinCourse" and ma.status == 1 %> <% end %> <% if ma.course_message_type == "RemoveFromCourse" %> <% end %> <% if ma.course_message_type == "Exercise" && ma.status == 2 && ma.course_message %> <% end %> <% if ma.course_message_type == "Exercise" && ma.status == 3 && ma.course_message %> <% end %> <% end %>