|
|
@ -50,10 +50,10 @@ class GraduationTopic < ApplicationRecord
|
|
|
|
def student_graduation_topic_status
|
|
|
|
def student_graduation_topic_status
|
|
|
|
sgt = self.student_graduation_topics
|
|
|
|
sgt = self.student_graduation_topics
|
|
|
|
status =
|
|
|
|
status =
|
|
|
|
if sgt.is_accepting.count == 0
|
|
|
|
if sgt.where(status: [0, 1]).count.zero?
|
|
|
|
2
|
|
|
|
|
|
|
|
elsif sgt.is_refused.count == self.student_graduation_topics.size
|
|
|
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
|
|
|
elsif sgt.is_accepting.count.zero?
|
|
|
|
|
|
|
|
2
|
|
|
|
else
|
|
|
|
else
|
|
|
|
1
|
|
|
|
1
|
|
|
|
end
|
|
|
|
end
|
|
|
|