|
|
@ -81,9 +81,11 @@ class Comment < ActiveRecord::Base
|
|
|
|
|
|
|
|
|
|
|
|
# 课程成员得分(英雄榜)
|
|
|
|
# 课程成员得分(英雄榜)
|
|
|
|
def act_as_student_score
|
|
|
|
def act_as_student_score
|
|
|
|
|
|
|
|
if self.commented.course
|
|
|
|
unless self.author.allowed_to?(:as_teacher, self.commented.course)
|
|
|
|
unless self.author.allowed_to?(:as_teacher, self.commented.course)
|
|
|
|
course_member_score(self.commented.course.id, self.author_id, "NewReply")
|
|
|
|
course_member_score(self.commented.course.id, self.author_id, "NewReply")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|